I want to use a variable as the df name but cant figure out how. I can do it this way
'vector2 <- df$columname'
If i want to do it in a loop looking at different data tables i cant do it. vector1 is the names of my data.tables that i want to put the column data into a vector2.
I want the loop to do this
'vector2 <- one$columname'
'vector2 <- two$columname'
'vector2 <- three$columname'
changing the data.table name each time it goes through the loop keeping column name the same.
'vector1<- c("one","two","three")
for(i in vector1) {
vector2 <- vector1$columname
}'