I want to cbind a column to the data frame with the column name dynamically assigned from a string
y_attribute = \"Survived\" cbind(test_data, y_attribute =
We can also do it with data.table
data.table
library(data.table) setDT(test_data)[, (y_attribute) := NA]