summarise() and summarize() {.build}

summarize() is one of the key functions in dplyr. It produces a new dataframe that aggregates that values of a column based on a certain condition.

For example, to calculate the mean r colnames(df_numeric_select), run the following

`r dataframe_name %>%summarise(mean(r colnames(df_numeric_select)))`


group_by() {.build}

group_by() and summarize() are a powerful combination of functions to summarize by groups

`r dataframe_name %>%group_by(r colnames(df_character_select)) %>%summarise(mean(r colnames(df_numeric_select)))`


*remember this pair!



matthewhirschey/bespokelearnr documentation built on Oct. 11, 2020, 12:57 a.m.