I have a list of dataframes for years 2025 to 2050. These are for 3 variables: temperature, precpitation and RH. I want to combine (cbind) all 3 variables for each year, rename their columns and then save as csv. E.g.
> combined_2025<-cbind(tasmean_2025,prmean_2025,rhmean_2025)
> colnames(combined_2025) <- c("tasmean","pr","rh")
> write.csv(combined_2025,"D:/...../combined_annual_mean_245_2025.csv")
Now, I can easily do this for one year, but I have 25 years to work on. I was thinking of a for loop, but that isn't working for cbind. Please suggest a more efficient way.