label {mefa} | R Documentation |
This function assigns a label to any kind of object. The label later can be retrieved and reused.
label(x) label(x) <- value
value |
any expression. |
x |
any object. |
The label can be any expression assigned to any object. It is stored as a character attribute. Inheritance is not implemented, so by any transformation of the object into another one, the label is lost.
Print out the label value.
Péter Sólymos, solymos@ualberta.ca
Sólymos P. 2008. mefa: an R package for handling and reporting count data. Community Ecology 9, 125–127.
http://mefa.r-forge.r-project.org/
x <- 1:10 x ## Assign a character label(x) <- "x is a vector" x ## Get back the label label(x) ## Note the effect of deparsing label(x) <- 1:10 label(x)