SweaveListingPreparations(
withOwnFileSection = FALSE,
withVerbatim = FALSE,
gin = TRUE,
ae = TRUE,
LineLength = getOption("width"),
Rset = getSweaveListingOption("Rset"),
Rdset = getSweaveListingOption("Rdset"),
Rin = getSweaveListingOption("Rin"),
Rout = getSweaveListingOption("Rout"),
Rcode = getSweaveListingOption("Rcode"),
Rcolor = getSweaveListingOption("Rcolor"),
RRecomdcolor = getSweaveListingOption("RRecomdcolor"),
Rbcolor = getSweaveListingOption("Rbcolor"),
Routcolor = getSweaveListingOption("Routcolor"),
Rcommentcolor = getSweaveListingOption("Rcommentcolor"),
pkg = getSweaveListingOption("pkg"),
pkv = getSweaveListingOption("pkv"),
lib.loc = NULL)
Sinput
, Soutput
,
Scode
environments; if TRUE
you should write some
gin
ae
"Rset"
"Rdset"
"Rin"
"Rout"
"Rcode"
"Rcolor"
;
rgb coordinates of the color in which to print R-code"RRecomdcolor"
;
rgb coordinates of the color in which to print R-code"Rbcolor"
;
rgb coordinates of the color in which to print Rkeywords
induced by intermediate packages."Rout"
;
rgb coordinates of the color in which to print R output"Rcomment"
;
rgb coordinates of the color in which to print comments
in R-code"pkg"
"pkv"
invisible()
SweaveListingPreparations
writes a corresponding preamble to the SweaveListingPreparations
-chunk.
The TeX code inserted by SweaveListingPreparations
sets colors,
requires TeX-package SweaveListingPreparations
is to be called in an Sinput
,
Soutput
, Scode
environments for use with TeX-package \code
, \file
, \pkg
and sets
the corresponding package version.
The default values are taken from
SweaveListingOptions.
The output to stdout can be captured in an require
or library
without adding extra arguments
to these commands (and hence displaying the actual Rcode),
you have to set up a global formatting matrix
.tobeDefinedPkgs
by setToBeDefinedPkgs
.SweaveListingPreparations()
SweaveListingPreparations(pkv="2.1")
Run the code above in your browser using DataLab