View source: R/R-to-variable.R
categoriesFromLevels | R Documentation |
Crunch categorical variables have slightly richer metadata than R's factor variables. This function generates a list of category data from a factor's levels which can then be further manipulated in R before being imported into Crunch.
categoriesFromLevels(level_vect)
level_vect |
A character vector containing the levels of a factor. Usually
obtained by running |
A list with each category levels id, name, numeric_value, and missingness.
categoriesFromLevels(levels(iris$Species))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.