How can I tell dplyr that I want to use a placeholder, e.g. instead of a variable name contained in a dataset?
For example, if I want to filter in mtcars only those with 4 cylinders:
mtcars %>% filter(cyl == 4)
Now with a placeholder:
place_holder_variable <- "cyl"
mtcars %>% filter(place_holder_variable == 4)
However, now I get "<0 rows> (or 0-length row.names)" instead of the filtered list.
How do I have to proceed instead?