Marten Winter wrote: Now that's a brief note. mApply in the Hmisc package may have large speed advantages over by for large datasets. Also look at the summarize function in Hmisc, which uses mApply. -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University