On Sun, 13 Nov 2005, Peter Dalgaard wrote: > jim holtman <[EMAIL PROTECTED]> writes: [...] > > > index <- match(colnames(table2), colnames(table1), nomatch=0) > > > t(t(table1[,index]) / table2[index != 0, drop=FALSE]) [...] > or even > > > sweep(table1, 2, table2[colnames(table1)], "/")
Perfect. I was not aware of sweep. The R help pages I read to solve this problem did not refer to that. Thanks to Jim and Peter. Claus ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html