Description Usage Arguments Value Author(s) See Also Examples
cbind
only combines matrix-like objects when they contain identical rownames.
This function allows any number of matrix-like objects to be cbound, even if they
contain very few (or even no) rownames in common. The result will have 1 row per unique
rowname across all the input matrix-like-objects, and will have NA
's inserted
where appropriate.
The first argument will be in the top left of the result, followed by all columns of the
2nd argument, and any new rows added to the bottom, until the final obect is added in
the bottom right hand corner. Thus the result grows diagonally.
1 | cbind.smart(..., sort.col = NULL)
|
sort.col |
Column to sort on. “NULL” is ok. |
... |
at least two matrix-like objects to be merged. |
a data.frame
with all input objects cbound together, and with 1 row per unique
rowname across all the input matrix-like-objects, with NA
's inserted
where appropriate.
Mark Cowley, 2010-03-10
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.