Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

normDataWithin

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

Rmisc: Ryan Miscellaneous

v1.5
GPL-3
Authors
Ryan M. Hope <rmh3093@gmail.com>
Initial release
2013-10-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.