sufficient: 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)])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".