center: A Data Transformation Function

Description Usage Arguments Examples

View source: R/center.R

Description

This function centers a variable around the mean. A new column will be created with the centered values. There is also the option to center within context.

Usage

1
center(x, variables = c(colnames(x)), context = "", standardized = FALSE)

Arguments

x

dataframe

variables

c() of columns to standardize

context

Name of column to group by

standardized

Do you want to calculate zscores? Logical. (Default = FALSE)

Examples

1
center(x, subset = c(colnames(x)), context = "group", standardized = FALSE)

dr-JT/datatransform documentation built on June 10, 2018, 6:31 p.m.