Calculates the mean, standard deviation, and number of observations in each group of a data.frame that has one continuous variable and two factors.
sufficient(x,
yname = dimnames(x)[[2]][[1]],
factor.names.keep = dimnames(x)[[2]][-c(1, 2)])
data.frame
containing a continuous variable and two factors.
Character name of response variable.
Character vecotr containing the names of two
factors in the x
data.frame.
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"
.