powered by
Converts a defined vector to a base R numeric or character, retaining metadata as passive attributes.
defined
strip_defined(x)
A base R vector with attributes (label, unit, etc.) intact.
label
unit
A defined vector.
as_numeric(), as_character()
as_numeric()
as_character()
gdp <- defined(c(3897L, 7365L), label = "GDP", unit = "million dollars") strip_defined(gdp) fruits <- defined(c("apple", "avocado", "kiwi"), label = "Fruit", unit = "kg" ) strip_defined(fruits)
Run the code above in your browser using DataLab