Re: [R] intersecting rows of a matrix

2008-02-20 Thread dxc13
Thank you, that also works perfectly! I am not sure which method works more efficiently, but they are both instantaneous and give the correct result. Thanks Derek Henrique Dallazuanna wrote: > > lk.list<-split(lk.mat.test,1:nrow(lk.mat.test)) > names(lk.list)<-NULL > do.call(intersection,lk

Re: [R] intersecting rows of a matrix

2008-02-20 Thread dxc13
Thanks Gabor, that works great! Gabor Grothendieck wrote: > > Try this: > > do.call(intersection, unname(as.data.frame(t(mat > > > On Wed, Feb 20, 2008 at 6:45 PM, dxc13 <[EMAIL PROTECTED]> wrote: >> >> useR's, >> >> First, I would like to say thanks to John Fox for providing this segmen

Re: [R] intersecting rows of a matrix

2008-02-20 Thread Henrique Dallazuanna
lk.list<-split(lk.mat.test,1:nrow(lk.mat.test)) names(lk.list)<-NULL do.call(intersection,lk.list) 2008/2/20, dxc13 <[EMAIL PROTECTED]>: > > useR's, > > First, I would like to say thanks to John Fox for providing this segment of > code to perform intersection for multiple sets: > intersection <- f

Re: [R] intersecting rows of a matrix

2008-02-20 Thread Gabor Grothendieck
Try this: do.call(intersection, unname(as.data.frame(t(mat On Wed, Feb 20, 2008 at 6:45 PM, dxc13 <[EMAIL PROTECTED]> wrote: > > useR's, > > First, I would like to say thanks to John Fox for providing this segment of > code to perform intersection for multiple sets: > intersection <- functio

[R] intersecting rows of a matrix

2008-02-20 Thread dxc13
useR's, First, I would like to say thanks to John Fox for providing this segment of code to perform intersection for multiple sets: intersection <- function(x, y, ...){ if (missing(...)) intersect(x, y) else intersect(x, intersection(y, ...)) } I want to execute this function on