taglist {SweaveListingUtils}R Documentation

S3 class taglist

Description

Generating function and print method for S3 class taglist

Usage

taglist(..., list = NULL, defname = "V")
## S3 method for class 'taglist':
print(x, LineLength = getOption("width"), offset.start = 0,
              withFinalLineBreak = TRUE, first.print = NULL,
                          ErrorOrWarn = "warn", ...)

Arguments

... arbitrary number of arguments in taglist, respectively, in print.taglist, further arguments to be passed to or from other methods. They are ignored in this function.
list list; to be prepended to the ... argument; useful to take in predefined default lists;
defname character; defaults to "V"; prefix of names given to a priori unnamed list elements; see below
x an object of class taglist
LineLength numeric; deafults to getOption("width"); number of characters per line; i.e.; print will make a linebreak between two tags before this number is reached; it will not break a tag, however, and only issue an error if this single tag is longer than max(3*LineLength,getOption("width")).
offset.start numeric; number of characters to indent in printing;
withFinalLineBreak logical; shall there be a final line break; defaults to TRUE.
first.print character; something to be printed immediately before the first list item; defaulting to NULL.
ErrorOrWarn shall we issue a warning (if partially matched to "warn" or else an error

Details

taglist is an S3 class inheriting from class list. It requires all elements to be uniquely named. Objects of this class can be generated by a call to the generating function taglist(); there is a particular print method for this class. The generating function taglist() accepts an arbitrary number of (not necessarily named) arguments and a list of (again not necessarily named) elements; if in the arguments of taglist() some list items do not have a name a priori, all of these get named in the order of appearance as <defname><position number in arglist>.

Value

taglist an object of S3 class taglist
print.default invisible()

Author(s)

Peter Ruckdeschel Peter.Ruckdeschel@itwm.fraunhofer.de

Examples

 TL <- taglist("HA"=8,"JUI"=7,"butzi", list=list("HU"="AHAL","HA"="BETA","BUZ"))
 print(TL)
 print(TL, LineLength=10, first.print="myList=", offset.start=4,
           withFinalLineBreak = FALSE)
 

[Package SweaveListingUtils version 0.3.3 Index]