Learn R Programming

EMAtools (version 0.1.4)

pcenter: Centering on person-means

Description

This function allows you to center on person-means (also called "centering within clusters")

Usage

pcenter(ID, var)

Arguments

ID

name of ID variable

var

name of variable to be centered

Value

A column in your dataframe (with person-centered data)

Examples

Run this code
# NOT RUN {
data$centeredVAR<-pcenter(data$ID,data$var)
# }

Run the code above in your browser using DataLab