Count the number of infinite or missing values in a vector.

countInf(x)

Arguments

x

a vector.

Value

countInf returns the number of infinite values in x. countNA returns the number of missing values in x.

Author

Andreas Alfons

Examples

data(sleep, package="VIM")
countInf(log(sleep$Dream))
#> [1] 1
countNA(sleep$Dream)
#> [1] 12