Description Usage Arguments Value Examples
Get the unique values of a dataframe column
1 | col_unique(data, column, n = NULL)
|
data |
data.frame, dataset to be subset |
column |
character or column object to select |
n |
numeric, optional, return only the nth record |
vector, unique column values or nth item of unique column values
1 2 3 4 | data <- tibble::tibble(country = c('USA', 'Albania', 'Borneo'), value = c(1, 2, 3))
data %>% col_unique(country)
data %>% col_unique(country, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.