The difference between select()and select_()is their non-standard / standard evaluation of the argument. If a select_()function of type is used as an argument starts_with(), it should be indicated by a tilde:
library(dplyr)
mtcars %>% select_(~starts_with('d'))
This gives the same result as normal use select:
identical(mtcars %>% select_(~starts_with('d')), mtcars %>% select(starts_with('d')))
For more information, see a vignette of a non-standard evaluation.: vignette("nse").
source
share