metaAdd | R Documentation |
The simplest is using only arguments data, meta.data, variable, and text (and unit if applicable). That will insert a line into the metadata describing the variable. The other two methods are for when a variable is a numeric code referring to factor levels (i.e. GRP or POP). If the character variable describing the levels is already present in data, use variable and var.char. If the levels are described in a data.frame, pass this data.frame as values.
metaAdd(
data,
meta.data,
variable = NULL,
text = NULL,
header = NULL,
var.char = NULL,
var.unit = NULL,
values = NULL,
unit = NA,
debug = F
)
data |
The dataset being described (i.e. a data.frame). |
meta.data |
The existing meta.data object (see
|
variable |
The name of the variable in the dataset to
describe. Must supply either this or |
text |
Description of |
header |
Append lines to the header of the meta data. The lines will be added in the order they are given. |
var.char |
Match the numerical values of |
var.unit |
Take unit from a column in data. The column must contain only one unique variable. NA values in the column are disregarded. |
values |
A data.frame with character values to merged with variable. values must contain a numeric column with the same name as variable. You cannot use both var.char and values. |
unit |
The unit of the variable. Will be printet in parenthesis when listing variables. |
debug |
Start by calling browser(). |
Updated meta data object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.