View source: R/show.cols.with.na.R
show.cols.with.na | R Documentation |
This function reports the number of missing values in each variable in a dataframe. Variables that have no missing values are ignored.
show.cols.with.na(x)
x |
The dataframe to check. |
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.
Andrew Robinson <apro@unimelb.edu.au>
Robinson, A.P., and J.D. Hamann. 2010. Forest Analytics with R: an Introduction. Springer.
is.na
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.