Re: [R] Union of columns of two matrices

2008-08-07 Thread Giuseppe Paleologo
I think we can declare this the global minimum in terms of size. Thanks to all for their contributions. On a personal note, what escaped me was the existence of MARGIN in set-related operations. -g On Thu, Aug 7, 2008 at 11:51 AM, Charles C. Berry <[EMAIL PROTECTED]>wrote: > On Thu, 7 Aug 2008,

Re: [R] Union of columns of two matrices

2008-08-07 Thread Charles C. Berry
On Thu, 7 Aug 2008, Dan Davison wrote: On Wed, Aug 06, 2008 at 06:32:43PM -0400, Giuseppe Paleologo wrote: I was posed the following problem/teaser: given two matrices, come up with an "elegant" (=fast & short) function that returns a matrix with all and only the non-duplicated columns of both

Re: [R] Union of columns of two matrices

2008-08-07 Thread Dan Davison
On Wed, Aug 06, 2008 at 06:32:43PM -0400, Giuseppe Paleologo wrote: > I was posed the following problem/teaser: > > given two matrices, come up with an "elegant" (=fast & short) function that > returns a matrix with all and only the non-duplicated columns of both > matrices; the column order does

Re: [R] Union of columns of two matrices

2008-08-06 Thread Johnson, Eric A. (Seattle)
: [R] Union of columns of two matrices I was posed the following problem/teaser: given two matrices, come up with an "elegant" (=fast & short) function that returns a matrix with all and only the non-duplicated columns of both matrices; the column order does not matter. In ess

Re: [R] Union of columns of two matrices

2008-08-06 Thread Ling, Gary (Electronic Trading)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Giuseppe Paleologo Sent: Wednesday, August 06, 2008 6:33 PM To: r-help@r-project.org Subject: [R] Union of columns of two matrices I was posed the following problem/teaser: given two matrices, come up with an

[R] Union of columns of two matrices

2008-08-06 Thread Giuseppe Paleologo
I was posed the following problem/teaser: given two matrices, come up with an "elegant" (=fast & short) function that returns a matrix with all and only the non-duplicated columns of both matrices; the column order does not matter. In essence, a matrix equivalent of union(x,y), where x and y are v