var_concept | R Documentation |
Assigns a concept URI to a vector created with defined()
. This
method updates the concept
attribute and validates that the input is a single
character string or NULL.
var_concept(x, ...)
var_concept(x) <- value
## Default S3 replacement method:
var_concept(x) <- value
x |
A vector to which the concept URI will be assigned. |
... |
Further parameters for inheritance, not in use. |
value |
A character string with a concept URI or NULL to remove the concept. |
get_variable_concepts()
is identical to var_concept()
.
The (linked) concept of the meaning of the data contained by a
vector constructed with defined
.
The modified vector with updated concept
metadata.
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_concept(small_country_dataset$country_name) <- "http://data.europa.eu/bna/c_6c2bb82d"
var_concept(small_country_dataset$country_name)
# To remove a concept definition of variable
var_concept(small_country_dataset$country_name) <- NULL
x <- defined(c(1, 2, 3), label = "Example Variable")
var_concept(x) <- "http://example.org/concept/XYZ"
var_concept(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.