CombineCols function

Combine vectors of various lengths

Combine vectors of various lengths

Combine arbitrary vectors of data, filling in missing rows with NaN

CombineCols(...,na.rm=FALSE)

Arguments

  • ...: d vectors of arbitrary lengths, see example
  • na.rm: boolean: FALSE: fills with NaN TRUE: filles with zeros

Details

Robust alternative to cbind that fills missing values with nan instead of extending length of vector by duplicating elements

Returns

matrix of dimensionality of n x d with n beeing the length of the longest vector and d the number of vectors given as input

Author(s)

Craig Varrichio

Note

special application by MCT of rowr cbind.fill which is now not on CRAN anymore

See Also

CombineRows

Examples

CombineCols(c(1,2,3),c(1),c(2,3))