rnotebook

1.0.0 • Public • Published

rnotebook

Creates R Markdown(.rmd) files. R Markdown is R's equivalent to IPython Notebooks.

Construct rnotebook

rnotebook is entirely a class. Construct it by running:

var notebook = new Notebook();

Add Markdown

Adding Markdown is simple. Add it by running:

notebook.addMarkdown(`# Hello, World!
- Hello
- World
`);

Add R Code

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()`);

Retrieve the .rmd file (as a string)

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 -->
*/

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i rnotebook

      Weekly Downloads

      0

      Version

      1.0.0

      License

      ISC

      Unpacked Size

      2.04 kB

      Total Files

      5

      Last publish

      Collaborators

      • brahmasharma