Good morning,

I'm running into trouble rbind-ing numeric matrices with differing numbers
of rows. In particular, there seem to be issues whenever a one-row numeric
matrix is involved.

Assume A is a numeric matrix with 1 row and Y columns and B is a numeric
matrix with X rows and Y columns. Let C be the result of rbinding A and B.
Then C is a numeric matrix with X + 1 rows and Y columns, only instead of
the rows of B being "stacked" beneath the row of A as expected, the first Y
elements of the 1st column of B are placed in the 2nd row of C, the
remaining values of B are discarded, and NULL values fill out the rest of
the matrix C.

The number of columns of A and B match. The colnames of A and B match. Both
are numeric matrices. I've pored over the rbind/cbind documentation but
can't identify why I'm getting this behavior from rbind. I'd be extremely
grateful for your suggestions or thoughts.

Nick

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to