Skip to content

cdupont/R-pandoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Nov 15, 2019
ef1d241 · Nov 15, 2019

History

30 Commits
Sep 4, 2015
Dec 4, 2016
Sep 14, 2015
Sep 9, 2015
Sep 13, 2015
Sep 4, 2015
Nov 15, 2019
Dec 4, 2016
Sep 4, 2015
Dec 4, 2016
Dec 4, 2016
Nov 15, 2019

Repository files navigation

Build Status

A pandoc filter to embbed R plots inside markdown documents.

See the Blog post for more details on usage.

Usage

Install R:

sudo apt-get install r-base

Create a file called demo.md with the following text:

Here is a nice plot:
    ~~~ {.Rplot}
    require(stats)
    D = 150
    T = 10
    t = seq(0, 80, 0.01)
    x = -D*exp(-(t/T))+D
    v = (D/T)*exp(-(t/T))
    plot(t, x, type="l", main="position through time", xlab="time (s)", ylab="position (m)", xlim=c(0,80), ylim=c(0, D+10),  xaxs = "i", yaxs = "i")
    ~~~

Now run:

    pandoc -t html demo.md --filter R-pandoc -o demo.html -s

The file demo.html should now have a nice plot included:

plot

Details

R-pandoc compiles code blocks containing R plots and includes the resulting images in the pandoc markup. It is meant to be run as a pandoc filter as shown above.

Installing

    git clone https://github.com/cdupont/R-pandoc.git
    cd R-pandoc
    stack install

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published