I am iterating through a loop and with every step I would like to give the generated data a different name and save it to the workspace.
for (l in 1:c){
data_daily <- data_temp_daily[l,]
data_daily_time <- data[(l:288*l),2]
newfile <- paste("data_daily_day", l, sep = "")
newfile <- data.frame(data_daily_time, data_daily)
}
newfile is the filename, which is correctly generated. However, I would like to save my df to the workspace with the newfile name! How can that be accomplished?
THANKS!