View source: R/center_group_mean.R
center_group_mean | R Documentation |
This function will compute group-mean-centered scores.
center_group_mean(data, cols, group, keep_original = TRUE)
data |
A data.frame or a data.frame extension (e.g. a tibble). |
cols |
Columns that need to be centered. See 'dplyr::dplyr_tidy_select' for available options. |
group |
character. grouping variable |
keep_original |
default is 'TRUE'. Set to 'FALSE' to remove original columns |
An object of the same type as .data. The output has the following properties: 1. Columns from .data will be preserved 2. Columns with scores that are group-mean centered
center_group_mean(iris,where(is.numeric), group = Species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.