Re: [R] question regarding intersect function

2011-10-25 Thread David Winsemius
On Oct 25, 2011, at 6:07 AM, Samir Benzerfa wrote: Hi I have probably a very simple question but I'm going crazy trying to find the solution. I have two data.frames with headers and I'm doing an intersection between them by names, such that the intersected data.frames are returned b

[R] question regarding intersect function

2011-10-25 Thread Samir Benzerfa
Hi I have probably a very simple question but I'm going crazy trying to find the solution. I have two data.frames with headers and I'm doing an intersection between them by names, such that the intersected data.frames are returned by: df1[intersect(names (df1), names(df2))] and the same for