[BioC] Combine two data frames with different columns

Daniel Brewer daniel.brewer at icr.ac.uk
Fri Feb 1 13:28:07 CET 2008


I would like to join two dataframes that have the majority of columns in
common but some different.  Let me give you an example:

Dataframe 1

ID	COL1	COL2	COL3
1	a	a	a	
2	b	b	b
3	c	c	c

Dataframe 2

ID	COL1	COL2	COL4
4	a	a	d	
5	b	b	d

And the joined dataframe I would like is:

ID	COL1	COL2	COL3	COL4
1	a	a	a	NA
2	b	b	b	NA
3	c	c	c	NA
4	a	a	NA	d	
5	b	b	NA	d

Any ideas?

Dan

**************************************************************
Daniel Brewer, Ph.D.
Institute of Cancer Research
Molecular Carcinogenesis
Email: daniel.brewer at icr.ac.uk
**************************************************************

The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the a...{{dropped:2}}



More information about the Bioconductor mailing list