Handle Missing Values in Distributed Matrices

Description

Dealing with NA's and NaN's.

Usage

1
2
3
4
na.exclude(object, ...)

## S4 method for signature 'ddmatrix'
na.exclude(object, ..., ICTXT)

Arguments

object

numeric distributed matrix

...

extra arguments

ICTXT

optional BLACS context number for output

Details

Removes rows containing NA's and NaN's.

The function relies on reblocking across different BLACS contexts. The input distributed matrix will be redistributed along context 1, where extracting/deleting rows does not destroy block-cyclicality.

Only advanced users should supply an ICTXT value. Most should simply leave this argument blank.

The context of the return is dependent on the function arguments. If the ICTXT= argument is missing, then the return will be redistributed across its input context object@ICTXT. Otherwise, the return will be redistributed across the supplied ICTXT.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## 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()

# don't do this in production code
x <- matrix(1:9, 3)
x[1, 1] <- NA
x <- as.ddmatrix(x)

y <- na.exclude(x)
comm.print(y)

finalize()

## End(Not run)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.