View source: R/var_definition.R
var_definition | R Documentation |
Get / set a definition for a vector or a dataset
var_definition(x, ...)
var_definition(x) <- value
definition_attribute(x)
get_definition_attribute(x)
set_definition_attribute(x, value)
definition_attribute(x) <- value
x |
a vector |
... |
Further parameters for inheritance, not in use. |
value |
a character string or |
get_variable_definitions()
is identical to var_definition()
.
The (linked) definition of the meaning of the data contained by a
vector constructed with defined
.
small_country_dataset <- dataset_df(
country_name = defined(c("Andorra", "Lichtenstein"), label = "Country"),
gdp = defined(c(3897, 7365),
label = "Gross Domestic Product",
unit = "million dollars")
)
var_definition(small_country_dataset$country_name) <- "http://data.europa.eu/bna/c_6c2bb82d"
var_definition(small_country_dataset$country_name)
# To remove a definition of measure
var_definition(small_country_dataset$country_name) <- NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.