View source: R/basic_tbl_tools.R
tbl_mutate | R Documentation |
Mutate Data with Various New Features
tbl_mutate( data, group_variables = NULL, absolute_change_columns = NULL, cumulative_sum_columns = NULL, cumulative_mean_columns = NULL, cummulative_min_columns = NULL, cumulative_max_columns = NULL, percent_change_columns = NULL, index_columns = NULL, index_calculation_variable = NULL, index_override_value = NULL, lag_columns = NULL, lead_columns = NULL, min_rank_columns = NULL, pct_rank_columns = NULL, dense_rank_columns = NULL, ... )
... |
library(tidyverse) library(asbtools) calculation_variables <- c("pop", "gdpPercap", "lifeExp") data = gapminder::gapminder gapminder::gapminder %>% tbl_mutate( group_variables = "country", index_columns = calculation_variables, index_calculation_variable = "year", cumulative_mean_columns = calculation_variables, min_rank_columns = calculation_variables ) gapminder::gapminder %>% tbl_mutate( group_variables = "country", index_columns = calculation_variables, index_calculation_variable = "year", cumulative_mean_columns = calculation_variables, min_rank_columns = calculation_variables, index_override_value = 2002 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.