I have the following code, and I would like to name the dataframe created from sqldf, as t2_value_of_i. I then want to append those files into one single file, what is the recommended way of going about this? The iteration below overwrites as t2_i throughout the loop. Thank you.
m4<-data.frame(m3[-1,])
colnames(m4)<-c("iteration_criteria")
m4$iteration_criteria<-as.character(m4$iteration_criteria)
m4.list <-vector("list", nrow(m4))
for (i in 1:nrow(m4)) {
m4.list[[i]] <- m4[i,] }
for (i in m4.list){
t2_i<-sqldf(print(paste(
"select a.*, b.iteration_criteria
from data_by_zone_final a left join t1 b on
(a.state_long=b.state_long) and
(a.state_short=b.state_short) and
(a.state_subregion_name=b.state_subregion_name)
where (a.local_hour_final=17) and b.iteration_criteria='",m4.list,"'",sep="" ) ))
}