tbl_nest | R Documentation |
Nest a tibble by grouping variables and specified other variables
tbl_nest( data, grouping_variables = NULL, nesting_variables = NULL, data_column_name = NULL )
data |
a 'tibble' |
grouping_variables |
vector of variables to group by |
nesting_variables |
if not 'NULL' vector of other variables to select |
data_column_name |
if not 'NULL' new nested data column name |
'tibble'
gapminder::gapminder %>% tbl_nest(grouping_variables = "year", data_column_name = "ttdata") gapminder::gapminder %>% tbl_nest(grouping_variables = c("continent", "country"), nesting_variables = c("pop", "year"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.