[R] create new rows with 0, if nessecary

Mat matthias.weber at fnt.de
Fri May 16 13:17:43 CEST 2014


hello togehter, 

i have a little problem, i have frames like this two:
      Cat      Hours      
A    101     15
B    103     10

      Cat      Hours      
A    103     16
B    106     11

I need to convert this 2 data.frames into the following equal structure:
      Cat      Hours
A    101
B    102
C    103
D    104
E    105
F    106

The 2 examples should be look this one:

      Cat      Hours
A    101      15
B    102       0
C    103      10
D    104       0
E    105       0
F    106       0

      Cat      Hours
A    101       0
B    102       0
C    103      16
D    104       0
E    105       0
F    106      11



--
View this message in context: http://r.789695.n4.nabble.com/create-new-rows-with-0-if-nessecary-tp4690699.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list