Git Product home page Git Product logo

Comments (4)

jjallaire avatar jjallaire commented on July 4, 2024 1

I believe that the V8 package has an embedded JS REPL: https://cran.r-project.org/web/packages/V8/index.html

One question I'd have is what you'd expect the REPL to do (i.e. would it need to interact with JS running in the Viewer pane, etc.). I've found that for D3 the snippets of code required to accomplishing things might not fit that well in a REPL (i.e. might require a few lines of code so be better off in a script editor or notebook cell).

from r2d3.

vnijs avatar vnijs commented on July 4, 2024

I hadn't thought about V8. I will take a closer look but at first glance it seems that you would have to write R-code with JS strings or source a JS file.

I guess I would like to be able to write and test JS interactively the way we can with R and Python in Rstudio. You can of course open a browser console and type there but that is a lot less convenient than having code in an editor and using CMD+return to execute one or more lines of code. Being able to send (with CMD-return) JS code to the console in the Rstudio Viewer or an Rstudio Window would already be very convenient I think.

Perhaps something like the ijavascript kernel in jupyter with an option to "send" to a Viewer, Window, or Browser console

from r2d3.

vnijs avatar vnijs commented on July 4, 2024

So similar to this sublime text addin ... but then in Rstudio: https://github.com/acarabott/chromeREPL

from r2d3.

nstrayer avatar nstrayer commented on July 4, 2024

For this what I like to do is add a debugger statement to my script near the end of the current progress and then fiddle in the browser's javascript source pane directly. Chrome and Co have done a ton of work making the dev-tools work well so you get a similar write-then-run by writing the code inline with the source. Another thing to look at would be to dump your source data to a json or csv file and then hop over to an observable notebook to build code then dump back into your script.
screen shot 2019-02-07 at 11 17 43 am
Hopefully that's of some help!

from r2d3.

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.