CombineRows | R Documentation |
Combine arbitrary matrices of data, filling in missing columns with NaN
CombineRows(...,na.rm=FALSE)
... |
First argument is a matrix usually with named columns, thereafter either matrices or d vectors of arbitrary lengths, see example |
na.rm |
boolean: FALSE: fills with NaN TRUE: filles with zeros |
Robust alternative to rbind
that fills missing values with #NaN, tries to match given column names
if matrices are inserted otherwise fills up the missing columns at the end.
The first argument has to be a matrix. It is assumed that this matrix has to be filled up and other arguments or not of bigger size than d columns. Otherwiese the further elements stored in columns >d are ignored.
matrix of dimensionality of n x d with n beeing the number of rows of the first argument and d the number columns of the first argument given as input
Michael Thrun
CombineRows
matrix_pattern=cbind(c(1,2,3),c(4,5,6),c(7,8,9))
CombineRows(matrix_pattern,c(1),c(2,3))
CombineRows(matrix_pattern,cbind(c(1,2,3),c(4,5,6)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.