Selecting multiple elements with [
NA
values in the selection vector (indices, logical) are returned as NA
This is different to:
dplyr::filter(df, df$x > 0)
dropsNA
values- base R:
which(<logical vector>)
dropsNA
values- it filters a logical vector for
TRUE
s and returns their index, e.g. inwhich(x > 0)
- it filters a logical vector for