Re: [R] generalization of tabulate()

2009-10-17 Thread Ted Harding
On 16-Oct-09 11:27:06, Gabor Grothendieck wrote: > Using the generalized inner product defined in this post: > >https://www.stat.math.ethz.ch/pipermail/r-help/2006-July/109311.html > > try this: > >cbind(S, d = rowSums(inner(S, obs, identical))) The function inner() is defined at the a

Re: [R] generalization of tabulate()

2009-10-16 Thread Bert Gunter
o. Cheers, Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gabor Grothendieck Sent: Friday, October 16, 2009 4:27 AM To: Robin Hankin Cc: r-help@r-project.org Subject: Re: [R] g

Re: [R] generalization of tabulate()

2009-10-16 Thread Gabor Grothendieck
Using the generalized inner product defined in this post: https://www.stat.math.ethz.ch/pipermail/r-help/2006-July/109311.html try this: cbind(S, d = rowSums(inner(S, obs, identical))) On Fri, Oct 16, 2009 at 4:29 AM, Robin Hankin wrote: > Hi > > I want a generalization of tabulate() wh

[R] generalization of tabulate()

2009-10-16 Thread Robin Hankin
Hi I want a generalization of tabulate() which works on rows of a matrix. Suppose I have an integer matrix 'observation': > observation y1 y2 y3 1 4 0 1 4 0 2 0 3 4 1 0 0 5 0 0 1 4 2 0 3 Each row corresponds to a (multivariate) observation. Note that the first two rows are identical: this mea