[R] combining matrices

Marten Winter marten.winter at ufz.de
Thu Apr 21 16:03:51 CEST 2011


Heja,

I hope someone is still there to help me:

How can I somehow merge/combine matrices to get such a result:

Matrix A

A B
x1 1 0
x2 1 1

Matrix B

C D
x3 1 0
x4 0 1

Resulting Matrix?


A B C D
x1 1 0 0 0
x2 1 1 0 0
x3 0 0 1 0
x4 0 0 0 1


Does anyone see this probably obvious solution with R how to do this?
Sorry if this question is silly...it's too hot here to think properly ;O)

Thanks!
cheers
Marten

-- 
--------------------------------------------------------------------------------------------
						
Dr. Marten Winter / Researcher
Biozönoseforschung / Community Ecology
				
Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Helmholtz Centre for Environmental Research GmbH - UFZ	
Theodor-Lieser-Str. 4  / 06120 Halle (Saale) / Germany
Telefon +49 345 558 5316 / Fax +49 345 558 5329
marten.winter at ufz.de / www.ufz.de/index.php?en=7081

Sitz der Gesellschaft: Leipzig
Registergericht: Amtsgericht Leipzig, Handelsregister Nr. B 4703
Vorsitzender des Aufsichtsrats: MinR Wilfried Kraus
Wissenschaftlicher Geschäftsführer: Prof. Dr. Georg Teutsch
Administrativer Geschäftsführer: Dr. Andreas Schmidt
						
--------------------------------------------------------------------------------------------

DAISIE - Delivering Alien Invasive Species Inventories for Europe www.europe-aliens.org

______________________________________________________________________________________________________________

„Fakten bedeuten gar nichts! Mit Fakten kann man ja alles beweisen, was auch nur im Entferntesten wahr ist!“

„Facts are meaningless! You could use facts to prove anything that's even remotely true!”
(Homer Simpson)



More information about the R-help mailing list