center_cols: A simple function to mean center variables

Description Usage Arguments

Description

This function will take a single variable and return the centered version of that variable. It can be used with the grouping parameter set to 'person_id' to get person-centered variables.

Usage

1
center_cols(data, variables, grouping)

Arguments

data

The dataset to operate on.

variables

The character vector of variables to lag

grouping

The character vector of grouping variables


seanchrismurphy/emacalc documentation built on May 12, 2019, 2:03 p.m.