Git Product home page Git Product logo

Comments (6)

hugetim avatar hugetim commented on May 28, 2024 1

Not necessarily syntax-compatible in a strict sense, but just sort of in a similar spirit. I guess the main goal I have in mind is that it be easy/natural for Stata users to learn and remember the syntax.

Anyway, whoops, I may have jumped the gun (but I had other work that I urgently need to procrastinate on, apparently): I went ahead and pushed a version of this. We can always revise the syntax later, though. Let me know how it strikes you in practice, or if you bump into any other issues.

from nbstata.

ideabucket avatar ideabucket commented on May 28, 2024 1

Thanks! I'll give it a go and report back in a few days after I've got my current data analysis project off my desk and can update the kernel without tempting Murphy's law.

from nbstata.

ideabucket avatar ideabucket commented on May 28, 2024 1

Finally had a chance to test this and it seems to be working great—thanks!

from nbstata.

hugetim avatar hugetim commented on May 28, 2024

I like this. The only thing I'm pondering is the syntax. It's rare for Stata commands to have a frame(someframe) option (maybe only frlink?). And I don't think they'd ever allow if somevariable == 1 for a variable not present in the current frame. Like we could do %browse frame someframe: if somevariable == 1 or %frame_browse someframe: if somevariable == 1, but I'm not sure either is an improvement. %frame someframe: browse if somevariable == 1 or %frame someframe: %browse if somevariable == 1?

from nbstata.

hugetim avatar hugetim commented on May 28, 2024

I'm leaning toward:

%frbrowse framename[: [varlist] [if] [in] [, nolabel noformat]]

edit: I'm not sure how to best indicate this in the syntax diagram, but %frbrowse framename is valid as the most basic call.

from nbstata.

ideabucket avatar ideabucket commented on May 28, 2024

Is the design goal to keep the magic syntax-compatible with the underlying stata command?

Because if that is the objective, a generic %frame prefix for magics would probably be nice and modular:%frame framename: %browse…, but equally %frame framename: %head…

Another possiblity that occurred to me would be a %frame magic that was the equivalent of wrapping the cell in frame framename { } but also worked on magics—but that would do unexpected things if the notebook was exported to a .do file, so I suspect is not a good idea.

from nbstata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.