Displaying 1 result from an estimated 1 matches for "vectordatamax".
2011 May 05
1
R - problem with my loops which operate on raster data
library(rgdal)
my_asc=dir("~/Pulpit/dods/karol/TVDI
113_121",pattern=".asc",recursive=T,full.names=T)
for (i in 1:length(my_asc))
{
r <- readGDAL(my_asc[i])
z <- as.matrix(r)
vectordata[i] <- mean(z)
vectordatamax[i] <- max(z)
vectordatamin[i] <- min(z)
vectordev[i] <- sd(z,na.rm=True)
hist(z)
png(filename="hist"+tostring(i)+".png")
}
<li>I try to do some modyfication of this loop, but it still doesn't works -
which fragment is incorrect?
<li>I would like als...