# NOT RUN {
select_this <- function(a_col){
select(mtcars, !!treat_input as_col(a_col))
}
select_this(cyl)
mean_this <- function(a_col){
mutate(mtcars, result = mean(!!treat_input_as_col(a_col)))
}
mean_this(cyl)
filter_same <- function(dat, x, y) {
filter(dat, !!treat_input_as_col(x) == !!treat_input_as_col(y))
}
filter_same(mtcars, carb, gear)
# }
Run the code above in your browser using DataLab