NAs: NAs()

Description Usage Arguments Examples

Description

Returns the number of NAs in an object by column (for data.frames and matricies) or just the number of NAs (for all other objects). You may also set the type argument to "percent" to see the percent of NAs.

Usage

1
NAs(data, type, digits)

Arguments

data

an object, can be a data.frame (see NAs by column), matrix (also see NAs by column), or a vector

type

"number" is the default, displaying the number of NAs. You may also use "percent" to see the percent of NAs

digits

the number of digits to round to when the type arguemnt is set to "percent"

Examples

1
2
3
4
5
6
To see the number of NAs either in total or by column, depending on the
class of the object inputted:
\code{NAs(my_data)}

Same as above, but now looking at the percent of NAs:
\code{NAs(my_data, type = "percent")}

jakesherman/jakemisc documentation built on May 18, 2019, 9:08 a.m.