This seems like a simple question, but I have not come across a clean solution for it yet. I have a vector in R and I want to remove certain elements from the vector, however I
You may like to try magrittr::extract. e.g.
magrittr::extract
> library(magrittr) > c("A", "B", "C", "D") %>% extract(.!="A") [1] "B" "C" "D"
For more extract-like functions load magrittr package and type ?alises.
extract
magrittr
?alises