lstset(taglist, LineLength = 80, startS = "\\lstset{")
lstsetR(Rset = NULL, LineLength = 80, add = TRUE, startS = "\\lstset{")
lstsetRd(Rdset = NULL, LineLength = 80, add = TRUE, startS = "\\lstset{")
numeric
number of characters per line for lstset and friends;
defaults to 80taglist
; 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 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"),
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 DataCamp Workspace