countNAs {MQMF} | R Documentation |
countNAs used in apply to count the number of NAs in a vector
Description
countNAs used in the base function 'apply', or 'tapply' to count the number of NAs in a vector
Usage
countNAs(invect)
Arguments
invect |
vector of values |
Value
A single value of zero or the number of NAs
Examples
x <- matrix(trunc(runif(20)*10),nrow=4,ncol=5)
diag(x) <- NA
print(x)
apply(x,1,countNAs)
[Package MQMF version 0.1.5 Index]