| filter_cens | R Documentation |
Filter variable where there are existing data in other variable.
filter_cens(x, y)
x |
Variable to be filtered. |
y |
Condition variable. |
Filtered variable.
df <- data.frame(
cars = 1:3,
cars_model = 4:6,
cars_speed = 7:9,
condition = c(NA, 1, 2)
)
dplyr::mutate_at(
df,
dplyr::vars(dplyr::starts_with("cars")),
filter_cens, y = df$condition
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.