metadata | R Documentation |
Function to retrieve metadata from an object.
metadata(x, ...)
x |
Object. |
... |
Other arguments (not used). |
key
Functions to assign, retrieve or check an index key for a given object.
description
Assign or retrieve a text description to an object.
units
Assigns or retrieves measurement units assigned to a data object.
fmt
Functions to assigns or retrieve data formatting information to and from an object.
keyword
Functions to assign, retrieve or look up object keyword attributes.
project
Functions to retrieve or assign project identifiers to objects.
header
Function to assign and retrieve file header information associated with a data object.
# Define sample data set: x <- data.frame(year = 2010:2014, site = letters[1:5], weight = exp(rnorm(5)), number = rpois(5,5)) # Define metadata attributes: units(x, "weight") <- "kilogram" description(x) <- c(year = "Year of sampling", site = "Sampling site", weight = "Weight of specimen", number = "Number observed") format(x, "year") <- "YYYY" key(x) <- "year" keywords(x) <- c("annual", "survey") # Retrieve metadata: metadata(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.