[R] Combine two columns

amarkey at uiuc.edu amarkey at uiuc.edu
Fri Mar 7 22:09:21 CET 2008


Is there a way to combine two columns within a data frame?

Example data:

id	snp	AL1	AL2
1500	30	A	B
1510	30	A	A
1520	30	A	B

This is what I would like:

indv	snp	AL1AL2
1500	30	AB
1510	30	AA
1520	30	AB

Any help is greatly appreciated.

Alysta



More information about the R-help mailing list