دنبال کننده ها

۱۳۹۶ شهریور ۱۰, جمعه

Interpolar raster temporary series

[ad_1]

Do the test




> F=(1:7)
> F
> i <- 1 ; n = F
> for( i in 1:length(F) )
> print((n[i] + n[i+1])/2)


[ 1] 1.5 [1] 2.5 [1] 3.5 [1] 4.5 [1] 5.5 [1] 6.5 [1] NA`





Now you do it with a raster list




> rasterlist=list.files(getwd(), pattern="tif$", full.names=FALSE)
> rasterlist i <- 1 ; n = (rasterlist) crop.list<-list() for (i in
> 1:length(rasterlist)) print(list.files (n[[i]] + n[[i+1]]/2))



give me error




Error in n[[i + 1]]/2 : non-numeric argument to binary operator




[ad_2]

لینک منبع