Using unquoted strings in with `dplyr` verbs: `select` and `arrange` working differently
问题 I am trying to unquote a string for use in dplyr::arrange . It does not appear to work. However, it appears to work correctly in dplyr::select . Am I missing something or doing something wrong here? library(tidyverse) df <- tibble(x = c(1, 2, 3), y = c(8, 6, 3)) v <- 'y' # `select` works with `!!v` df %>% select(y) #> # A tibble: 3 x 1 #> y #> <dbl> #> 1 8 #> 2 6 #> 3 3 df %>% select(!!v) #> # A tibble: 3 x 1 #> y #> <dbl> #> 1 8 #> 2 6 #> 3 3 # `arrange` not work with `!!v` df %>% arrange(y)