What is the knitr equivalent of `R CMD Sweave myfile.rnw`?

后端 未结 4 770
庸人自扰
庸人自扰 2020-12-12 12:52

What is the command-line knitr equivalent of R CMD Sweave myfile.rnw?

4条回答
  •  时光取名叫无心
    2020-12-12 13:37

    R CMD knit file.Rmd
    

    is the direct equivalent to R CMD Sweave file.Rmd

    Lately, there are enhanced functions in rmarkdown and knitr for this kind of dirty work. For slides, I've been using the Rmarkdown YAML header to designate the intended output format and the command line is basic, like

    R -e "library(rmarkdown); render(\"file.Rmd\")"
    

提交回复
热议问题