[R] Combining Vectors

From: Fanie Nel <nel.fanie_at_gmail.com>
Date: Wed 17 May 2006 - 22:58:52 EST


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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed May 17 23:04:24 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 18 May 2006 - 00:10:17 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.