I am using these codes but it is not work between december and march. I want to use dates for select layers but ı dont know how ı can do
Could u help me? dir.create(dir.out1, showWarnings = F) dir.create(dir.out2, showWarnings = F) dir.create(dir.out3, showWarnings = F) for (year in 1949:2019) { fi <- paste0(dir.in,"soilw2_",year,".nc") r <- brick(fi) d<-rotate(r) ec<-extent(-179.0625, 180.9375, 0, 89.49406 ) ed<-extent(-179.0625, 180.9375, -89.49406, 0) c5<-crop(d,ec) c5.1<-crop(d,ed) c6<-calc(c5[[152:243]],fun = mean) c7<-calc(c5.1[[152:243]],fun = mean) fo1 <- paste0(dir.out1,"mean.JUN-AUG.North.2_",year,".tif") fo2 <- paste0(dir.out2,"mean.JUN-AUG.South.2_",year,".tif") writeRaster(c6,file=fo1,overwrite=T) writeRaster(c7,file=fo2,overwrite=T) } Windows 10 için Posta<https://go.microsoft.com/fwlink/?LinkId=550986> ile gönderildi ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.