I have created multiple data frames by using below code :
assign(paste0("DF_VID", i) , subset(df, df$VID == unique(mydata$VID)[i]))
I would like to add new column class
in each created data frame (DF_VID1
, DF_VID2
,...). I tried ("DF_VID", i)[,"class"] <- 0
but it is showing error and when I try with DF_VID1[, "class"] <- 0
then it runs but just for one data frame. I want to know how to add new column in each data frame dynamically.