?tapply ?aggregate
You probably have a data frame, not a matrix.
Marc Mamin wrote:
I suppose this is a basic question but couldn't find a solution.:
I have a large matrix with let say 3 columns:
V1 V2 V3 a x 2 a x 4 a y 8 b z 16
and I want to compute some statistics based on the levels resulting form the combination of the two first columns
e.g.:
SUM->
V1 V2 V3 a x 6 a y 8 b z 16
-- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
