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 
individual with 'mothers i.d' into the row for her offspring (so individual 01 
would have 16 in the mothers age column, as thats the age of individual 03)

Hope that makes sense, any help appreciated,

Thanks
Laura

        [[alternative HTML version deleted]]

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to