naRbind | R Documentation |
Take a sequence of vector, matrix or data-frame arguments and combine by columns or rows, respectively. If the length of the R objects differ they are filled with NAs.
naRbind(..., deparse.level = 1)
... |
A sequence of vector, matrix or data-frame to bind |
deparse.level |
Integer controlling the construction of labels in the case of non-matrix-like arguments (for the default method): deparse.level = 0 constructs no labels; the default, deparse.level = 1 or 2 constructs labels from the argument names, see the 'Value' section below. |
The code is based on the rbind()
function.
For the default method, a matrix combining the ... arguments column-wise or row-wise. (Exception: if there are no inputs or all the inputs are NULL, the value is NULL.)
The type of a matrix result determined from the highest type of any of the inputs in the hierarchy raw < logical < integer < double < complex < character < list .
cbind
or rbind
documentation.
# Vector
naRbind(1:10, 1:20)
# Matrix
naRbind(matrix(1:10, ncol = 2), matrix(1:20, ncol = 2), matrix(1:30, ncol = 3))
# Data.frame
naRbind(data.frame(x=1:10, y=1:10, c=1:10), data.frame(c=1:20, d=1:20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.