[R] cbin *-* Problem with different vector lenghts

Geophagus falk.hilliges at twain-systems.com
Tue Aug 16 08:49:23 CEST 2011


Hi @ all,
I have the following question:
Is there a possibilty to cbind tree dataframes with different numbers of
rows?

Here is my example:

> b2007
5 8
1 1

> b2008
3 6 8
3 1 2

> b2009
1 3 8
1 2 1

> cbind (b2007,b2008,b2009)

  b2007 b2008 b2009
3     1     3     1
6     1     1     2
8     1     2     1
Warnmeldung:
In cbind(b2007, b2008, b2009) :
  number of rows of result is not a multiple of vector length (arg 1)

I also need the row name "5" and the "1" with NA or 0 as value in the
result.
I hope my problem was understandable.

Thanks a lot in advance!
Falk aka Geophagus 

--
View this message in context: http://r.789695.n4.nabble.com/cbin-Problem-with-different-vector-lenghts-tp3746473p3746473.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list