Description Usage Arguments Value Examples
View source: R/get_na_counts.R
This function takes a 'data.frame' object as an input and returns the corresponding ‘NA' counts. 'NA' refers to R’s builtin missing data holder.
1 | get_na_counts(x, grouping_cols = NULL, exclude_cols = NULL)
|
x |
A valid R 'object' for which 'na_counts' are needed. |
grouping_cols |
A character vector. If supplied, one can provide the columns by which to group the data. |
exclude_cols |
Columns to exclude from the analysis. |
An object of the same type as 'x' showing the respective number of missing values. If grouped is set to 'TRUE', the results are returned by group.
1 2 3 4 5 | get_na_counts(airquality)
# Grouped counts
test <- data.frame(Subject = c("A","A","B","B"), res = c(NA,1,2,3),
ID = c("1","1","2","2"))
get_na_counts(test,grouping_cols = c("ID", "Subject"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.