dplyr's arrange doesn't seem to work with !!
Please see MWE, where I am trying to sort a data.frame by the "date" variable, but instead of using date I want to parameterise it using a character/string
library(dplyr)
a = data.frame(date = 1:3, ok = 1:3)
a %>%
arrange(date)
date = "date"
a %>%
arrange(!!date) # doesn't work
meh = "date"
a %>%
arrange(!!meh) # doesn't work
I thought !! can be used in any dplyr function to perform Standard Evaluation (SE) of the variable. Is the understanding not correct? How do I correct this?