format
Format Unordered and Ordered Lists for Printing
Description
Formats the unordered and ordered lists for printing.
Usage
formatUL(x, label = "*", offset = 0, width = 0.9 * getOption("width"))
formatOL(x, type = "arabic", offset = 0, start = 1,
width = 0.9 * getOption("width"))
Arguments
x |
a vector of character strings to format.
|
label |
a character string or a vector of character strings given to formatUL: the tags for the formatted strings.
formatOL generates labels.
|
offset |
a positive integer. All output lines start with at least offset spaces.
('At least' because the labels are right-justified.)
|
start |
a positive integer telling formatOL where to start generating labels.
For example, start=4 means the first label is "4.", "d.", or "iv.",
depending on the value of type.
|
width |
A positive integer. Line breaks are inserted so that when the
output is printed with cat(sep="\n", output),
no line is longer than width characters.
|
type |
a character string giving the type of label for formatOL to generate.
Must be one of "arabic" (Arabic numerals),
"Alph" or "alph" (English letters),
or "Roman" or "roman" (Roman numerals),
or their respective codes, "1", "A", "a", "I", or "i".
If type starts with a capital letter, the label is
capitalized.
|
Value
returns a vector of character strings that you can print with
cat(sep="\n",value) to produce an attractive labelled
list of strings.
See Also
Examples
txt <- c("The most important concern",
"A secondary concern",
"Matters of little interest to us")
cat(sep="\n", formatUL(txt, label="-->"))
cat(sep="\n", formatOL(txt, type="Roman", width=40, offset=10))