lstset(taglist, LineLength = getOption("width"), startS = "\\lstset{")
lstsetR(Rset = NULL, LineLength = getOption("width"), add = getSweaveListingOption("addRset"),
startS = "\\lstset{")
lstsetRd(Rdset = NULL, LineLength = getOption("width"), add = getSweaveListingOption("addRdset"),
startS = "\\lstset{")
lstsetRin(Rinset = NULL, LineLength = getOption("width"), add = getSweaveListingOption("addRinset"),
startS = "\\lstdefinestyle{Rinstyle}{")
lstsetRout(Routset = NULL, LineLength = getOption("width"), add = getSweaveListingOption("addRoutset"),
startS = "\\lstdefinestyle{Routstyle}{")
lstsetRcode(Rcodeset = NULL, LineLength = getOption("width"), add = getSweaveListingOption("addRcodeset"),
startS = "\\lstdefinestyle{Rcodestyle}{")
numeric
number of characters per line for lstset and friends;
defaults to getOption("width")taglist
; arguments for
taglist
or named list
of
character
s; the listings settings for R-code
(for NULL
.taglist
or named list
of
character
s; the listings settings for R-code in
environment Sinput
; defaults to NULL
.taglist
or named list
of
character
s; the listings settings for R-code in
environment Soutput
; defaults to NULL
.taglist
or named list
of
character
s; the listings settings for R-code in
environment Scode
; defaults to NULL
.taglist
or named list
of
character
s;
the listings settings for Rd-code
(for NULL
.TRUE
; if TRUE
, argument list
Rset
resp. Rdset
will be appended to default value
lists getSweaveListingOption("Rset")
resp.
"\\lstset{"
; what to do
by default we use \lstset
; an alternative is
to use \lstdefinestyle
which amounts to
"\\lstdefinestyle{"
.invisible()
lstset
writes out to stdout a call to TeX command
lstsetR
and lstsetRd
expect either
objects of S3 class taglist
, or lists
of named characters as
first arguments, which in the latter case are then converted to taglist
;
both lstsetR
and lstsetRd
use particular default values to
define R resp. Rd output format. More
specifically for R code, it uses
getSweaveListingOption("Rset"),
and for Rd code, it
getSweaveListingOption("Rdset");
lstsetRin
, lstsetRout
, and lstsetRcode
are corresponding specialized commands for 'listings' environments
Sinput
, Soutput
, and Scode
, respectively.
The output to stdout can be captured in an lstset(taglist(A="H", b=2, 3),30)
lstset(taglist(A="H", b=2, 3),30, startS = "\\lstdefinestyle{Rstyle}{")
lstsetR()
lstsetRd()
Run the code above in your browser using DataLab