[R] Combining Vectors

Fanie Nel nel.fanie at gmail.com
Wed May 17 14:58:52 CEST 2006


Hi, I'm a new R user, and struggeling with the basics (...sigh)

I would like to combine 2 vectors :

d1:

"S1"   "S2"  "S3"  "S4"
   1        3       5       6


and


d2:

"S1"    "S3"   "S5"
   3          3       2

to give a result:

"S1"   "S2"  "S3"  "S4"  "S5"
  1        3        5       6    Na
  3      Na        3     Na     2

or better still:

"S1"   "S2"  "S3"  "S4"  "S5"
  1        3        5       6       0
  3         0        3      0       2


Any ihelp will be appreciated

Thanks
Fanie Nel




More information about the R-help mailing list