label | R Documentation |
Assigns a label to a vector or data frame, or returns value stored
in the object's label
attribute (or NA
if none exists).
label(x, all = FALSE, fallback = FALSE, simplify = FALSE)
label(x) <- value
llabel(x, all = TRUE, fallback = FALSE, simplify = FALSE)
x |
An R object to extract labels from. |
all |
Logical. When x is a data frame, setting this argument to
|
fallback |
a logical value indicating if labels (returned values)
should fallback to object name(s). Defaults to |
simplify |
When x is a data frame and |
value |
String to be used as label. To clear existing labels, use
|
The wrapper function llabel
was named that way to avoid conflicting
with base function labels
.
A single character vector if all = FALSE
(default),
or a named list if all = TRUE
(named vector when using
simplify = TRUE
.
Loosely based on Gergely Daróczi's label
function.
Dominic Comtois, dominic.comtois@gmail.com,
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.