Created
October 31, 2014 04:36
-
-
Save air-drummer/05a900942f5646d0917a to your computer and use it in GitHub Desktop.
pandoc conversion in R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#assuming we have a "example.rmd" file in our working directory | |
library(knitr) | |
knit2html("example.rmd") | |
# installing/loading the package: | |
if(!require(installr)) { install.packages("installr"); require(installr)} #load / install+load installr | |
# Installing pandoc | |
install.pandoc() | |
FILE <- "example" | |
system(paste0("pandoc -o ", FILE, ".docx ", FILE, ".md")) | |
#your .docx file is ready! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment