Skip to content

Instantly share code, notes, and snippets.



Last active May 22, 2020
What would you like to do?
Function to build R package vignettes, retaining both .md and .Rmd
# From
# Usage: render_keep_md("tabyls")
render_keep_md <- function(vignette_name){
# added the "encoding" argument to get the oe character passed through correctly to the resulting .Md
rmarkdown::render(paste0("./vignettes/",vignette_name, ".Rmd"), clean=FALSE, encoding = 'UTF-8')
files_to_remove = paste0("./vignettes/",vignette_name, c(".html","",""))
lapply(files_to_remove, file.remove)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment