key | R Documentation |
Functions to assign, retrieve or check an index key for a given object.
key(x, ...)
x |
Object. |
... |
Other arguments (not used). |
value |
Character string(s) specifying the index key to be assigned. |
key
Default key
method.
key.default
Default format
retrieval method. If no key
attribute is
defined, then a call to format
is made.
key<-
Generic key
assignment method. See Examples for usage.
key<-.default
Defaultkey
assignment method. See Examples for usage.
is.key
Defaultis.key
method.
is.key.data.frame
Check validity of an index key for a data.frame
object.
metadata
# Build sample data: x <- data.frame(year = 1990:2014, measurement = rpois(25, lambda = 5)) key(x) <- "year" # Assign key. key(x) # Retrieve key. is.key(x, "measurement") # Generally FALSE is.key(x, "year")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.