Description Usage Arguments Value Note Author(s) See Also Examples
Generate a Knitr file (silk) from an R script (a sow's ear, usually). This takes a R script and generates a Rnw (R + LaTeX) or Rmd (R + Markdown) file. Sections of the file with exactly two leading hashes are converted to "markup" (documentation sections), code is evaluated, and sections beginning "##+" are options for code chunks. Sections with three or more hashes ("###") are ignored.
1 |
script |
An R script file. |
type |
If specified, either "Rnw" or "Rmd", indicating the
required conversion target. If not specified, this is guessed from
the extension of |
output |
An output file name. If not given, it is constructed
from the input file name and the conversion type. If neither
|
Invisible TRUE
on success.
Currently, the Sweave version assumes your document is standalone. It
probably should offer a template, like knitr
's stitch
.
Richard G. FitzJohn
knit
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
file.copy(system.file("sowsear-example.R", package="sowsear"),
".", overwrite=FALSE)
sowsear("sowsear-example.R", "Rmd")
knit("sowsear-example.Rmd")
system("pandoc -s -S -i -o sowsear-example.html sowsear-example.md")
file.remove(sprintf("sowsear-example.
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.