SweaveListingUtils-package
Package SweaveListingUtils
Package
Details
<-
and
<<-< code=""> get typeset by one symbol each.
For a corresponding TeX preamble combining Sweave and
SweaveListingPreparations
.
As for the Rlanguage definition, we allow for different keywordstyles
to typeset symbols from different packages. This is useful to distinguish
mark-up for newly defined functions and alread existing ones.
More specifically, whenever in some Rcode sniplet in some Sweave chunk, there
is some library
or require
command, the corresponding symbols
found by ls()
afterwords in some search()
entry position, are
registered as
(printed as 5 items per line)
as a new "higher order" group of keywords by a corresponding
\lstdefinelanguage{R}%
{morekeywords=[
is incremented (resp. gets looked up from
the global, non-exported variable .alreadyDefinedPkgs
in the package
name space) at each instance of
a library
or require
command.
To this end commands
library
and
require
are masked. See also
lstsetLanguage
,
changeKeywordstyles
,
and setToBeDefinedPkgs
As for the integration of code sniplets from an url (by default, we use
the svn server at R-forge in its most recent version), this can be
useful to stay consistent with the current version of the code without
having to update vignettes all the time. To this end, besides referencing
by line numbers, lstinputSourceFromRForge
also offers
referencing by matching regular expressions.
Functions
lstset lstsetR lstsetRd SweaveListingPreparations readSourceFromRForge copySourceFromRForge lstinputSourceFromRForge readPkgVersion SweaveListingOptions getSweaveListingOption SweaveListingoptions SweaveListingMASK setToBeDefinedPkgs lstsetLanguage changeKeywordstyles library require
S3 classes and methods
taglist print.taglist
Example - .Rnw vignette file
An example