cbind {spam}R Documentation

Combine spam Matrices by Rows or Columns

Description

Take a sequence of vector, matrix or spam object arguments and combine by columns or rows, respectively.

Usage

cbind.spam(..., deparse.level = 0)
rbind.spam(..., deparse.level = 0)

Arguments

... vectors, matrices or spam objects. See Details and Value
deparse.level for compatibility reason here. Only 0 is implemented.

Details

rbind and cbind are not exactly symmetric in how the objects are processed. The former is essentially an concatenation of the slots due to the sparse storage format. Different types of inputs are handled differently. The former calls a Fortran routine after the input has been coerced to spam objects.

Only two objects at a time are processed. If more than two are present, a loop concatenates them successively.

A method is defined for a spam object as first argument.

Value

a spam object combining the ... arguments column-wise or row-wise. (Exception: if there are no inputs or all the inputs are NULL, the value is NULL.)

Author(s)

Reinhard Furrer

See Also

cbind,spam-method.

Examples

x <- cbind.spam(1:5,6)

y <- cbind(x, 7)

# for some large matrices the following might be slightly faster:

t( cbind( t(x), t(x)))

## Not run: 
# Method is only defined for the first argument:
cbind(diag(2),diag.spam(2))
## End(Not run)


[Package spam version 0.15-3 Index]