Learn R Programming

pbdDMAT (version 0.2-3)

Comparators: Logical Comparisons

Description

Logical comparisons.

Usage

x == y
x < y
x > y
x >= y
x 

Arguments

x, y
distributed matrix or numeric vector
na.rm
logical, indicating whether or not NA's should first be removed. If not and an NA is present, NA is returned.

Value

  • Returns a distributed matrix.

Details

Performs the indicated logical comparison. If na.rm is TRUE and only NA's are present, then TRUE is returned.

See Also

Type

Examples

Run this code
# 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()

# don't do this in production code
x <- matrix(sample(0, 1, 9, replace=T), 3)
comm.print(x)

x <- as.ddmatrix(x, bldim=2)

y <- any(x)
comm.print(y)

finalize()

Run the code above in your browser using DataLab