count_NAs: Calculate the number of NAs in an object

View source: R/count_NAs.R

count_NAsR Documentation

Calculate the number of NAs in an object

Description

Calculate the number of NAs in an object. Can be useful for determining the sparseness of matrices and data frames, or their component rows or columns.

Usage

count_NAs(x)

Arguments

x

object to be tested for NAs. Can be a data.frame, matrix, vector, list. For lists, it looks at the list elements themselves, not within those elements. For other object types, results may not be as expected.

Value

integer, the number of NAs in x


mjdufort/miscHelpers documentation built on Feb. 4, 2024, 7:44 p.m.