df[, newcol] is considered undefined column name if newcol is a variable. Have to add a new column and then change the column name to the value that newcol indicates to