countNAs: countNAs used in apply to count the number of NAs in a vector

View source: R/rutils.R

countNAsR Documentation

countNAs used in apply to count the number of NAs in a vector

Description

countNAs used in apply to count 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

## Not run: 
  set.seed(12346)
  x <- trunc(runif(10)*10)
  x[c(3,7)] <- NA
  countNAs(x)  # should be 2

## End(Not run)

haddonm/codeutils documentation built on April 15, 2024, 1:02 p.m.