labels | R Documentation |
Creates “nice” labels from objects.
LABELS(x, max_width = NULL, dots = "...", unique = FALSE,
limit = NULL, ...)
LABEL(x, limit = NULL, ...)
## S3 method for class 'character'
LABEL(x, limit = NULL, quote = sets_options("quote"), ...)
x |
For |
max_width |
Integer vector (recycled as needed) specifying the
maximum label width for each component of |
dots |
A character string appended to a truncated label.
If |
unique |
Logical indicating whether
|
limit |
Maximum length of vectors or sets to be represented as is. Longer elements will be replaced by a label. |
quote |
Should character strings be quoted, or not?
(default: |
... |
Optional arguments passed to the |
A character vector of labels generated from the supplied object(s).
LABELS
first checks whether the object has names and uses these
if any; otherwise, LABEL
is called for each element to generate
a “short” representation.
LABEL
is generic to allow user extensions.
The current methods return the result of format
if the
argument is of length 1 (for objects of classes set
and
tuple
: by default of length 5), and create a simple class
information otherwise.
LABELS(list(1, "test", X = "1", 1:5))
LABELS(set(X = as.tuple(1:20), "test", list(list(list(1,2)))))
LABELS(set(pair(1,2), set("a", 2), as.tuple(1:10)))
LABELS(set(pair(1,2), set("a", 2), as.tuple(1:10)), limit = 11)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.