With 'knitr' package, you can publish html documents out of rmd files.
library(knitr)
knit2html("C:/your/file//location/Input.Rmd","C:/your/file//location/Output.html")
With 'rmarkdown' package, you can convert rmd to pdf.
At the time of writing this blog, in Windows 8 or higher, pandoc installation program does not register its path to exe file automatically, hence you need to set the path manually. One option is to use Sys.setenv() function within R to point to where pandoc application is.
At the time of writing this blog, in Windows 8 or higher, pandoc installation program does not register its path to exe file automatically, hence you need to set the path manually. One option is to use Sys.setenv() function within R to point to where pandoc application is.
library(rmarkdown)
Sys.setenv(PATH=paste(Sys.getenv("PATH"),"C:\\your\\file\\location\\Pandoc",sep=";"))
render("C:/your/file//location/Input.Rmd","pdf_document",
output_file="C:/your/file//location/Output.pdf",
output_dir=getwd())
No comments:
Post a Comment