considered when
calculating the difference.
- Original Message
From: Jorge Ivan Velez <[EMAIL PROTECTED]>
To: joseph <[EMAIL PROTECTED]>
Sent: Sunday, September 14, 2008 11:14:11 AM
Subject: Re: [R] difference of two data frames
Hi Joseph,
I'm not sure if I understoo
in my real data the uniqueness of the rows is made of all the columns; in other words V1 might have duplicates.
Thanks
- Original Message
From: Jorge Ivan Velez <[EMAIL PROTECTED]>
To: joseph <[EMAIL PROTECTED]>
Cc: r-help@r-project.org
Sent: Sunday, September 14, 2008 10:23:33
gt;
To: joseph <[EMAIL PROTECTED]>
Cc: r-help@r-project.org
Sent: Sunday, September 14, 2008 10:23:33 AM
Subject: Re: [R] difference of two data frames
Hi Joseph,
Try this:
DF1[!DF1$V1%in%DF2$V1,]
subset(DF1,!V1%in%DF2$V1)
HTH,
Jorge
On Sun, Sep 14, 2008 at 12:49 PM, joseph <[
eeds <[EMAIL PROTECTED]>
To: joseph <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Sent: Sunday, September 14, 2008 10:07:48 AM
Subject: RE: [R] difference of two data frames
Hi: If you mean a dataframe of the rows in DF1 that are not in DF2 , then I
think below will work for the letters, which
Hi Joseph,
Try this:
DF1[!DF1$V1%in%DF2$V1,]
subset(DF1,!V1%in%DF2$V1)
HTH,
Jorge
On Sun, Sep 14, 2008 at 12:49 PM, joseph <[EMAIL PROTECTED]> wrote:
> Hello
> I have 2 data frames DF1 and DF2 where DF2 is a subset of DF1:
> DF1= data.frame(V1=1:6, V2= letters[1:6])
> DF2= data.frame(V1=1:3,
Hello
I have 2 data frames DF1 and DF2 where DF2 is a subset of DF1:
DF1= data.frame(V1=1:6, V2= letters[1:6])
DF2= data.frame(V1=1:3, V2= letters[1:3])
How do I create a new data frame of the difference between DF1 and DF2
newDF=data.frame(V1=4:6, V2= letters[4:6])
In my real data, the rows are no
6 matches
Mail list logo