Creates R Markdown(.rmd) files. R Markdown is R's equivalent to IPython Notebooks.
rnotebook is entirely a class. Construct it by running:
var notebook = new Notebook();
Adding Markdown is simple. Add it by running:
notebook.addMarkdown(`# Hello, World!
- Hello
- World
`);
Again, adding code is simple. Add R code by running:
notebook.addRCode(`library(ggplot2)
ggplot(data.frame(x=1:10, y=1:10), aes(x, y)) + geom_point()`);
In the class, internally it just appends to a string. So you just have to get the string. You can do that by:
notebook.notebook; /*
# Hello, World!
- Hello
- World
<!-- stripped R code due to this documentation's markdown -->
*/