# NOT RUN {
c1 <- 1:5
c2 <- 3:7
col1 <- 'c1'
col2 <- 'c2'
new_col_name <- 'res'
ateval(
'@new_col_name <- @col1 + @col2'
)
print(res)
# larger example
c3 <- 4:8
terms <- paste(c('c1', 'c2', 'c3'), collapse = ' + ')
print(ateval('@terms'))
# }
Run the code above in your browser using DataLab