show.cols.with.na {FAwR} | R Documentation |
Identifies variables in a dataframe that have missing values, along with a count.
Description
This function reports the number of missing values in each variable in a dataframe. Variables that have no missing values are ignored.
Usage
show.cols.with.na(x)
Arguments
x |
The dataframe to check. |
Value
A vector of missing values counts, one value for each variable with missing values. If no variables have missing values then prints a message and exits.
Author(s)
Andrew Robinson <apro@unimelb.edu.au>
References
Robinson, A.P., and J.D. Hamann. 2010. Forest Analytics with R: an Introduction. Springer.
See Also
Examples
test <- data.frame(a = c(1,2), b = c(3,4))
show.cols.with.na(test)
is.na(test$a[2]) <- TRUE
show.cols.with.na(test)
[Package FAwR version 1.1.2 Index]