make_mean_median_mode_table_by_group | R Documentation |
Create a table showing the mean, median, and mode of a certain column
make_mean_median_mode_table_by_group( data, group_column, data_column, total_row = TRUE )
data |
A data.frame with the data you want to make the table from. |
group_column |
A string with the name of the variable you are grouping by |
data_column |
A string for the variable you want to get the mean, median, and mode from, Variable should be numeric. |
total_row |
A boolean (default TRUE) for whether to include a row a the bottom for the overall mean and standard deviation (i.e. not by group). |
A data.frame with the first column showing the category grouped by. Then one column for the mean, one column for the median, and one column for the mode.
make_mean_median_mode_table_by_group(mtcars, "gear", "mpg")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.