I have created an Rmd file and I know that if I go to the tools bars and select "knit to word" it will generate a word document form me.
My question is how can I do this with R code without having to actually clicking on the "knit to word" option on the top tool bar?
I have this code but the word document it creates does not work
library(knitr)
knit("AutomationPricingReport.Rmd", "AutomationPricingReport.docx")
You can do something like this
rmarkdown::render("AutomationPricingReport.Rmd",
output_file = "AutomationPricingReport.docx"
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With