cbind.Rd
Take a sequence of vector, matrix or spam
object arguments and
combine by columns or rows, respectively.
# cbind(\dots, force64 = getOption("spam.force64"), deparse.level = 0)
# rbind(\dots, deparse.level = 0)
vectors, matrices or spam
objects. See ‘Details’ and ‘Value’
logical vector of length 1. If TRUE
, a 64-bit
spam matrix is returned in any case. If FALSE
, a 32-bit
matrix is returned when possible.
for compatibility reason here. Only 0
is implemented.
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
.)
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 latter 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.
x <- cbind.spam(1:5,6)
y <- cbind(x, 7)
rbind( x, x)
#> [,1] [,2]
#> [1,] 1 6
#> [2,] 2 6
#> [3,] 3 6
#> [4,] 4 6
#> [5,] 5 6
#> [6,] 1 6
#> [7,] 2 6
#> [8,] 3 6
#> [9,] 4 6
#> [10,] 5 6
#> Class 'spam' (32-bit)
# for some large matrices t( cbind( t(x), t(x)))
# might be slightly faster: