isdot {pbdDMAT}R Documentation

Type Checks, Including NA, NaN, etc.

Description

Functions to check for various types.

Usage

is.ddmatrix(x)

## S4 method for signature 'ddmatrix'
is.na(x)

## S4 method for signature 'ddmatrix'
is.nan(x)

## S4 method for signature 'ddmatrix'
is.numeric(x)

## S4 method for signature 'ddmatrix'
is.infinite(x)

Arguments

x

numeric distributed matrix

Details

Performs the appropriate type check.

Value

Returns boolean in the case of is.numeric() and is.ddmatrix(), otherwise a distributed matrix.

Examples

## Not run: 
# Save code in a file "demo.r" and run with 2 processors by
# > mpiexec -np 2 Rscript demo.r

suppressPackageStartupMessages(library(pbdDMAT, quiet=T))

init.grid()

comm.set.seed(seed=1234, diff=TRUE)

x <- ddmatrix("rnorm", 5, 5, bldim=2)
test <- comm.any(is.na(x))
comm.print(test)

x[1,1] <- NA
test <- comm.any(is.na(x))
comm.print(test)

finalize()

## End(Not run)


[Package pbdDMAT version 0.4-0 Index]