Learn R Programming

pbdDMAT (version 0.4-2)

binds: Row and Column binds for Distributed Matrices

Description

Row and column binds.

Usage

rbind.ddmatrix(..., ICTXT = .pbd_env$ICTXT, deparse.level = 1)

cbind.ddmatrix(..., ICTXT = .pbd_env$ICTXT, deparse.level = 1)

Arguments

...

vectors, matrices, or distributed matrices.

ICTXT

BLACS communicator number for return object.

deparse.level

integer controlling the construction of labels in the case of non-matrix-like arguments. Does nothing for distributed matrices.

Value

Returns a vector, matrix, or distributed matrix, depending on input.

Methods

list("signature(... = \"ANY\")")

an R object.

Details

The ... list of arguments can be vectors, matrices, or distributed matrices so long as non-distributed objects are not used with distributed objects. This kind of mixing-and-matching will lead to chaos. Currently no check is performed to prevent the user from this mixing-and-matching for performance reasons (it is slow enough already).

Examples

Run this code
# NOT RUN {
# Save code in a file "demo.r" and run with 2 processors by
# > mpiexec -np 2 Rscript demo.r

library(pbdDMAT, quiet = TRUE)
init.grid()

x <- ddmatrix(1:16, ncol=4, bldim=2)

y <- rbind(x, x)

print(y)

finalize()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab