Re: [R] merging/intersecting 2 data frames

2010-06-30 Thread John Kane
Have you changed the values in b.df? My reading of the original b.df in Erin's post was that there were no common values in PATIENT_ID and ID. --- On Tue, 6/29/10, jim holtman wrote: > From: jim holtman > Subject: Re: [R] merging/intersecting 2 data frames > To: "Erin

Re: [R] merging/intersecting 2 data frames

2010-06-29 Thread Greg Snow
r-help-boun...@r- > project.org] On Behalf Of Erin Hodgess > Sent: Tuesday, June 29, 2010 1:22 PM > To: R help > Subject: [R] merging/intersecting 2 data frames > > Dear R People: > > I have two data frames, a.df and b.df as seen here: > > > a.df[1:10

Re: [R] merging/intersecting 2 data frames

2010-06-29 Thread jim holtman
use 'merge' > a.df DATE GENDER PATIENT_ID AGE SYNDROME 1 4/16/2009 F 23686 45 RASH ON BODY 2 4/16/2009 F 13840 35 CANT URINATE 3 4/16/2009 M 12895 30 BLURRED VISION 4 4/16/2009 M 18375 33 UNABLE TO VOID

Re: [R] merging/intersecting 2 data frames

2010-06-29 Thread Weidong Gu
Erin, ?merge Try c.df=merge(a.df,b.df,by.x="PATIENT_ID",by.y="ID") hope it helps Weidong __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html a

[R] merging/intersecting 2 data frames

2010-06-29 Thread Erin Hodgess
Dear R People: I have two data frames, a.df and b.df as seen here: > a.df[1:10,] DATE GENDER PATIENT_ID AGE SYNDROME 1 4/16/2009 F 23686 45 RASH ON BODY 2 4/16/2009 F 13840 35 CANT URINATE 3 4/16/2009 M 12895 30 BLURRED