swfscMisc (version 1.3)

na.count: Count NAs

Description

Counts NAs in an object.

Usage

na.count(x)

Arguments

x

a vector, data.frame, or matrix.

Examples

Run this code
# NOT RUN {
x <- sample(c(1:10, NA), 30, replace = TRUE)
na.count(x)
x.df <- do.call(data.frame, lapply(1:4, function(i) sample(c(1:10, NA), 30, replace = TRUE)))
colnames(x.df) <- paste("X", 1:4, sep = "")
na.count(x.df)

# }

Run the code above in your browser using DataLab