| sufficient {HH} | R Documentation |
Calculates the mean, standard deviation, and number of observations in each group of a data.frame that has one continuous variable and two factors.
Description
Calculates the mean, standard deviation, and number of observations in each group of a data.frame that has one continuous variable and two factors.
Usage
sufficient(x,
yname = dimnames(x)[[2]][[1]],
factor.names.keep = dimnames(x)[[2]][-c(1, 2)])
Arguments
x |
|
yname |
Character name of response variable. |
factor.names.keep |
Character vector containing the names of two
factors in the |
Value
Data.frame containing five columns and as many rows as are implied by
the crossing of the two factors. Each row contains the mean in a
column with the name yname and its factor values in columns
named with the name in factor.names.keep. The standard deviation of
the observations in the group are in the column "sd" and the number
of observations in the group is in the column "nobs".
Author(s)
Richard M. Heiberger <rmh@temple.edu>
See Also
[Package HH version 3.1-52 Index]