# NOT RUN {
## drop this run-time determined column.
b <- "cyl"
select(mtcars, -!!treat_string_as_col(b))
## function double a column
double_col <- function(dat, arg) {
dplyr::mutate(dat, result = !!rlang::sym(arg) * 2)
}
double_col(mtcars, arg = 'cyl')
# }
Run the code above in your browser using DataCamp Workspace