Tanks a lot for your suggestions. maybe there will be a lot of different
ways to do that but merging your scripts I found exactly what I wanted to
do:

# beginning
library(raster)
r1 <- raster(matrix(c(1,1,1,2,2,2,4,4,4), ncol = 3))
r2 <- raster(matrix(c(2,2,2,3,3,3,1,1,1), ncol = 3))
r3 <- raster(matrix(c(5,5,5,1,1,1,2,2,2), ncol = 3))
r <- stack(r1,r2,r3)
plot(r)
#?calc
res1<-calc(r,fun=max) # single raster map with maximum values of all 3
rasters
plot(res1)
# end

 Now let's see if my i5 processor is able to process 22 raster maps
with 77,760,000
cells each.... :)

thank You very much again!!

-- 
Maurizio Marchi, PhD student
CRA-SEL (Arezzo, Italy)
www.selvicoltura.eu
ID skype: maurizioxyz
*Ubuntu 12.04 LTS*
*"Il bello dell'open-source è che le domande possono essere poste alla
fonte"*
*utente linux 552.742*

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to