Hi, I currently have more than 700 matrices in my environment tab.
Each of them is large matrices, and each of them is named tmax1, tmax2, tmax3, ..., tmax365 and tmin1, tmin2, tmin3, ..., tmin365.
(FYI I got them using this code; tmax2011 is the name of the big dataset I am using)
for(i in 1:365){
nam <- paste("tmax", i, sep = "")
assign (nam, ncvar_get(tmax2011, "tmax", start = c(1,1,i), count = c(720, 360, 1)))
}
for(i in 1:365){
nam <- paste("tmin", i, sep = "")
assign (nam, ncvar_get(tmin2011, "tmin", start = c(1,1,i), count = c(720, 360, 1)))
}
I want to make 365 more matrices named tavg1, tavg2, ..., tavg365.
Each of the matrices should be average values of tmax1 and tmin1, tmax2 and tmin2, and so on.
Is there any way I can use the for loop to make these matrices?
Thanks