I want to do the same as here but with dplyr and one more column.
I want to selecting a column via a string variable, but on top I also want to select a second column normally. I need this because I have a function which selects a couple of columns by a given parameters.
I have the following code as an example:
library(dplyr)
data(cars)
x <- "speed"
cars %>% select_(x, dist)
I know I'm a little late to this one, but I figured I would add it for others.
OR this would work too
You can use
quote()
for thedist
column