strip_defined {dataset} | R Documentation |
Strip the class from a defined vector
Description
Converts a defined
vector to a base R numeric or character,
retaining metadata as passive attributes.
Usage
strip_defined(x)
Arguments
x |
A |
Value
A base R vector with attributes (label
, unit
, etc.) intact.
See Also
Examples
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)
[Package dataset version 0.3.9 Index]