Comments (4)
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.
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.
So similar to this sublime text addin ... but then in Rstudio: https://github.com/acarabott/chromeREPL
from r2d3.
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.
Hopefully that's of some help!
from r2d3.
Related Issues (20)
- forcegraph.js using container = "canvas" not working
- Data passed to multiple charts HOT 1
- Render r2d3 output in rmarkdown document with `rmarkdown::knitr()` function
- Request: Add support for version 7 of D3
- No guide on importing SVG
- Pass info from D3 back to [R] HOT 1
- Error adding multiple dependencies HOT 1
- Debugging: Rstudio D3 Preview with Full R Code HOT 1
- Why does the image produced from r2d3 is static?
- Implementing D3 6.0 HOT 4
- Question: r2d3 still maintained? HOT 2
- Inproper data join after input change HOT 1
- Width and Height parameters don't seem to work
- Quick questions about width and height HOT 1
- Move `master` branch to `main` HOT 1
- D3 preview in RStudio does not render imported SVG
- Cleanup the README formatting
- "publishing.html" documentation article has mis-rendered R code blocks
- Brush selection lost after page resize
- issues when rendering an r2d3-based package's plots in shiny
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r2d3.