HenrikBengtsson / R.rsp

:page_facing_up: R package: Dynamic generation of scientific reports
https://henrikbengtsson.github.io/R.rsp/
31 stars 6 forks source link

Postprocessors: Make it possible to specify next or stack of postprocessors #35

Open HenrikBengtsson opened 5 years ago

HenrikBengtsson commented 5 years ago

Example:

html <- R.rsp::rfile("main.Rmd.rsp", postprocess = TRUE)  # default
html <- R.rsp::rfile("main.Rmd.rsp", postprocess = "knitr")  # which the default uses
html <- R.rsp::rfile("main.Rmd.rsp", postprocess = "Rmarkdown")

Right now the latter can be achieved manually by:

html <- rmarkdown::render(R.rsp::rfile("main.Rmd.rsp", postprocess = FALSE))
HenrikBengtsson commented 5 years ago

Another example is

html <- R.rsp::rfile("main.md.rsp", postprocess = TRUE)  # default
html <- R.rsp::rfile("main.md.rsp", postprocess = "markdown")  # same as the default
html <- R.rsp::rfile("main.md.rsp", postprocess = "commonmark")