3 Convert Sweave to R script - sweave2script()

The sweave2script() function converts an Sweave source file (such as shoes.Rnw, see also shoes.pdf) into a script file shoes-script.R.

  • This is an old contribution (originally in the pre rmarkdown days).
  • By default, shoes-script.R is subsequently put through knitr::spin() which produces shoes-script.html.
  • Only very few features of the LaTeX language are understood and translated by sweave2script().