R: Count NAs

na.count {swfscMisc} | R Documentation

## Count NAs

### Description

Counts NAs in an object.

### Usage

    na.count(x)

### Arguments

`x` | a vector, data.frame, or matrix.

### Author(s)

Eric Archer eric.archer@noaa.gov

### Examples

    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)

[Package swfscMisc version 1.2 Index]