xweave
From exams v2.1-0
by Achim Zeileis
Wrapper Function for Weaving Either Rnw or Rmd Exercises
Simple wrapper function that either calls Sweave
for Rnw exercises or knit
for Rmd exercises.
- Keywords
- utilities
Usage
xweave(file, quiet = TRUE, encoding = NULL, envir = new.env(), pdf = TRUE, png = FALSE, height = 6, width = 6, resolution = 100, ...)
Arguments
- file, quiet, encoding
- arguments passed to
Sweave
orknit
, respectively. - envir
- argument passed to
knit
. - pdf, png, height, width, resolution, ...
- arguments passed to
Sweave
oropts_chunk
, respectively. In the latter case:pdf
/png
are mapped todev
;height
/width
are mapped tofig.height
/fig.width
; andresolution
is mapped todpi
.
Details
Depending on whether file
has an .Rnw
or .Rmd
suffix,
either Sweave
or knit
is called for
weaving the file. If png = TRUE
when calling Sweave
, then
the resulting includegraphics statements are supplemented with the .png
suffix of the corresponding graphics.
See Also
Community examples
Looks like there are no examples yet.