Description Usage Arguments Value See Also Examples
This utility function finds and counts any NA
values
in each variable of a data frame.
1 | missing_values(dt, sorted = TRUE)
|
dt |
A vector, matrix, data frame or S3 object of |
sorted |
A logical scalar value. Do you want to sort the results?
Default = |
A named numeric. Names are the column names if the
input is a data frame, column numbers for a matrix or
index positions if a vector.
Values are the count of NA
found in that variable
1 2 3 4 | missing_values(c(1, 1, 1, NA, NA, 1))
missing_values(matrix(c(1, 1, NA, NA), ncol = 2))
missing_values(data.frame(x = c("foo", NA, NA), y = c(NA, "bar", "bar")))
missing_values(data.frame(x = c("foo", NA, NA), y = c(NA, "bar", "bar")), sorted = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.