| mat_miss | R Documentation |
Calculate the number or proportion of missing values per column or per row of a numeric matrix without allocating a full logical mask matrix.
mat_miss(obj, col = TRUE, prop = FALSE)
obj |
A numeric matrix. |
col |
Logical. If |
prop |
Logical. If |
A numeric vector containing missing-value counts or proportions for columns or rows, named when the corresponding dimension names are present.
obj <- matrix(c(1, NA, 3, 4, NA, 6, NA, 8, 9), nrow = 3)
obj
# column missing counts
mat_miss(obj)
# row missing counts
mat_miss(obj, col = FALSE)
# column missing proportions
mat_miss(obj, prop = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.