Re: [R] Matching data to a new column

2009-06-26 Thread Luc Villandre
lt;- xx[, c(1,2)] ; ag1 ag2 <- xx[, c(1,3)] ; ag2 names(ag2[2]) <- "I.D" merge(ag1,ag2, by="I.D") --- On Fri, 6/26/09, Kubasiewicz, Laura wrote: From: Kubasiewicz, Laura Subject: [R] Matching data to a new column To: "r-help@r-project.org" Received:

Re: [R] Matching data to a new column

2009-06-26 Thread John Kane
ames(ag2[2]) <- "I.D" merge(ag1,ag2, by="I.D") --- On Fri, 6/26/09, Kubasiewicz, Laura wrote: > From: Kubasiewicz, Laura > Subject: [R] Matching data to a new column > To: "r-help@r-project.org" > Received: Friday, June 26, 2009, 6:55 AM > >

Re: [R] Matching data to a new column

2009-06-26 Thread Dieter Menne
Kubasiewicz, Laura imperial.ac.uk> writes: > I have a dataframe with columns for... > > 'I.D' 'age' 'mothers I.D' > 01 5 03 > 02 6 06 > 03 16 NA > 04 8 06 > 05 3 NA > 06 17 NA > > I need to create a new column for 'mothers age' which put

[R] Matching data to a new column

2009-06-26 Thread Kubasiewicz, Laura
Hi all, I wonder if anyone can help, I have a dataframe with columns for... 'I.D' 'age' 'mothers I.D' 01 5 03 02 6 06 03 16 NA 04 8 06 05 3 NA 06 17 NA I need to create a new column for 'mothers age' which puts the age of the individua