normDataWithin: Normalize within-group data

View source: R/summarySE.R

normDataWithinR Documentation

Normalize within-group data

Description

Norms the data within specified groups in a data frame; it normalizes each subject (identified by idvar) so that they have the same mean, within each group specified by betweenvars.

Usage

  normDataWithin(data = NULL, idvar, measurevar,
    betweenvars = NULL, na.rm = FALSE, .drop = TRUE)

Arguments

data

a data frame.

idvar

the name of a column that identifies each subject (or matched subjects)

measurevar

the name of a column that contains the variable to be summariezed

betweenvars

a vector containing names of columns that are between-subjects variables

na.rm

a boolean that indicates whether to ignore NA's

.drop

should combinations of variables that do not appear in the input data be preserved (FALSE) or dropped (TRUE, default)

Value

a data frame with normalized data

References

http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)


Rmisc documentation built on May 2, 2022, 5:05 p.m.