View source: R/filter_dataset.R
| count_missing_values_per_variable | R Documentation |
Returns the number of missing values per variable.
count_missing_values_per_variable(dataset, remove.zero = TRUE)
dataset |
Dataset to inspect. |
remove.zero |
If TRUE, removes zero counts. |
A named numeric vector giving the number of missing values for each variable in 'dataset$data'. If 'remove.zero' is 'TRUE', only variables with at least one missing value are returned.
data <- matrix(
c(1, 2, NA,
4, 5, NA),
nrow = 2,
dimnames = list(c("x1", "x2"), c("s1", "s2", "s3"))
)
metadata <- data.frame(class = c("A", "B", "A"), row.names = c("s1", "s2", "s3"))
dataset <- list(data = data, metadata = metadata)
count_missing_values_per_variable(dataset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.