Reputation: 185
When I generate my .md and .html files with the following code using knitr::spin instead of knitr:knit on the command line, it completely ignores the global chunk options:
Rscript -e "require(knitr)" -e "knitr::spin('script.R')" \
-e knitr::opts_chunk[['set']](include=FALSE)"
Could you tell me please how to set global options from the command line with spin?
Upvotes: 0
Views: 114
Reputation: 30114
Set the global chunk options before you spin()
the R script, e.g.
Rscript -e "library(knitr)" -e "knitr::opts_chunk[['set']](include=FALSE)" \
-e "knitr::spin('script.R')"
Upvotes: 2