rm_empty_block | R Documentation |
It is common to want to remove cases/rows where all variables in a particular set are missing, e.g. all symptom variables are missing in a health care dataset.
rm_empty_block(.data, ...)
.data |
Dataframe. |
... |
Unquoted variable/column names. |
Data frame.
# Pretend that we want to remove rows that are missing in group1, group2, and group3
# but keep rest of dataset.
colon_s %>%
dplyr::mutate(
group1 = rep(c(NA, 1), length.out = 929),
group2 = rep(c(NA, 1), length.out = 929),
group3 = rep(c(NA, 1), length.out = 929)
) %>%
rm_empty_block(group1, group2, group3) %>%
head()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.