Skip to content

Instantly share code, notes, and snippets.

@1beb
Created November 30, 2012 21:28
Show Gist options
  • Save 1beb/4178775 to your computer and use it in GitHub Desktop.
Save 1beb/4178775 to your computer and use it in GitHub Desktop.
Set options on RStudio to only print fragments, remove CSS and add table of contents to output file
options(rstudio.markdownToHTML =
function(inputFile, outputFile) {
require(markdown)
markdownToHTML(inputFile,"tmp.html",fragment.only=TRUE)
system(paste("pandoc", "-s -S --toc","tmp.html", "-o", outputFile))
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment