[R] create new column to combine 2 data.frames

Mat matthias.weber at fnt.de
Fri Aug 30 10:37:13 CEST 2013


Hello together i have a little problem with the combine of two data.frames.

I have 2 data.frames, which look like this one:

first dataframe:
ID Name
1  Jack
2  John
3  Jill

second dataframe
ID  Days  Type
1    3       Training
2    1       Management 
3    4       Training

At the end i want to create a data.frame like this one (the Type should be
the new column and the entry of the column should be the days):

ID Name  Training    Management
1  Jack    3            0
2  John    0            1
3  Jill       4            0

maybe anyone can help me, how i can do this.

Thanks a lot.

Best regards. Mat



--
View this message in context: http://r.789695.n4.nabble.com/create-new-column-to-combine-2-data-frames-tp4674963.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list