I run some automatic reports each day with batch-files on my windows-computer. But how do I do this with a .rmd file and generate the html-output?
So, this works for me using a batchfile with a normal .R file:
"C:\R\R-3.0.1\bin\x64\Rscript.exe" --default-packages=methods
"C:\R\R-3.0.1\bin\x64\Scripts\models.R"
But, this won't:
"C:\R\R-3.0.1\bin\x64\Rscript.exe" --default-packages=methods,knitr
"C:\R\R-3.0.1\bin\x64\Scripts\test_knitr.Rmd"
I've tried some variations inspired by command-line like:
"C:\R\R-3.0.1\bin\x64\Rscript.exe" --default-packages=methods,knitr
knit("C:\R\R-3.0.1\bin\x64\Scripts\test_knitr.Rmd")
But no succes so far! Im a total knitr/.rmd newbee, so I'm not even sure it can be done.
I use something along the lines
Rscript -e "require ('knitr'); knit ('test.Rmd')"
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