What is the command-line knitr equivalent of
R CMD Sweave myfile.rnw
The general solution (works regardless of the R version):
Rscript -e "library(knitr); knit('myfile.Rmd')"
Since R 3.1.0,
R CMD Sweave has started to support non-Sweave documents (although the command name sounds a little odd), and the only thing you need to do is to specify a vignette engine in your document, e.g.
To see the possible vignette engines in knitr, use
library(knitr) library(tools) names(vignetteEngine(package = 'knitr')) # "knitr::rmarkdown" "knitr::knitr" "knitr::docco_classic" "knitr::docco_linear"