What is the most efficient method for creating a data frame containing vectors
of
summary statistics? For example, suppose that data frame d contains age.group,
sex, and y.
I want to make a new data frame containing the combinations of age.group and sex
that occurred in the data, along with a new matrix variable or two new
variables containing
the 0.25 and 0.75 quantiles. Then I'll pass the new summary data frame to
trellis for
graphing results. tapply will do the calculations I need but the resulting
format is a
matrix rather than a data frame containing combinations of stratification
variables.
---------------------------------------------------------------------------
Frank E Harrell Jr
Professor of Biostatistics and Statistics
Director, Division of Biostatistics and Epidemiology
Dept of Health Evaluation Sciences
University of Virginia School of Medicine
http://www.med.virginia.edu/medicine/clinical/hes/biostat.htm
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|