center_grand_mean: Center with respect to grand mean

View source: R/center_grand_mean.R

center_grand_meanR Documentation

Center with respect to grand mean

Description

This function will compute grand-mean-centered scores.

Usage

center_grand_mean(data, cols, keep_original = TRUE)

Arguments

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.

keep_original

default is 'FALSE'. Set to 'TRUE' to keep original columns

Value

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 grand-mean-centered.

Examples

center_grand_mean(iris,where(is.numeric))


psycCleaning documentation built on Nov. 5, 2023, 9:06 a.m.