me(C1=sample(LETTERS[1:25],15,replace=FALSE),C2=1:15)
>>> set.seed(3)
>>> df3<-data.frame(C1=sample(LETTERS[1:10],10,replace=FALSE),B1=rnorm(10,3))
>>> set.seed(5)
>>> df4<-data.frame(C1=sample(LETTERS[1:15],10,replace=FALSE),A2=rnorm(10,15))
>>> df1$
ple(LETTERS[1:15],10,replace=FALSE),A2=rnorm(10,15))
>> df1$C1[df1$C1%in%df2$C1[df2$C1%in%df3$C1[df3$C1%in%df4$C1]]]
>> #[1] G E H J
>> A.K.
>>
>>
>>
>> - Original Message -
>> From: Silvano Cesar da Costa
>> To: r-help@r-project.org
&g
E H J
> A.K.
>
>
>
> - Original Message -
> From: Silvano Cesar da Costa
> To: r-help@r-project.org
> Cc:
> Sent: Sunday, September 2, 2012 7:05 PM
> Subject: [R] Common elements in columns
>
> Hi,
>
> I have 4 files with 1 individuals in each
2012 7:05 PM
Subject: [R] Common elements in columns
Hi,
I have 4 files with 1 individuals in each file and 10 columns each.
One of the columns, say C1, may have elements in common with the other
columns C1 of other files.
If I have only 2 files, I can do this check with the command:
dat
Hi,
I have 4 files with 1 individuals in each file and 10 columns each.
One of the columns, say C1, may have elements in common with the other
columns C1 of other files.
If I have only 2 files, I can do this check with the command:
data1[data1 %in% data2]
data2[data2 %in% data1]
How do I ch
5 matches
Mail list logo