NaNs: NaNs()

Description Usage Arguments Examples

Description

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

Usage

1
NaNs(data, type, digits)

Arguments

data

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

type

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

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 NaNs either in total or by column, depending on the
class of the object inputted:
\code{NaNs(my_data)}

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

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