categories_for_level | R Documentation |
For tables with data with hierarchical categories, metadata containing hierarchy level descriptions is used to extract categories at a specified level of hierarchy only.
categories_for_level( data, column_name, level = NA, strict = FALSE, remove_duplicates = TRUE )
data |
data table object as returned from |
column_name |
the quoted name of the column to extract categories from |
level |
the hierarchy level depth to which to extract categories, where 0 is top category |
strict |
(default |
remove_duplicates |
(default |
A vector of categories
## Not run: data <- get_cansim("16-10-0117") categories_for_level(data,"North American Industry Classification System (NAICS)",level=2) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.