if (interactive() && requireNamespace("rmarkdown", quietly = TRUE)) {
## draft from a sample R markdown file
jds.rmd::draft("jds-sample.Rmd")
## produce pdf with the tex source kept for submission
rmarkdown::render("jds-sample.Rmd")
}
Run the code above in your browser using DataLab