Skip to content
Prev 23752 / 29559 Next

Take mean of list of raster stacks

Nice use of do.call Loic (Sorry, don't know how to do the accents).  I
wasn't aware that you can send in a list to args!  So, thanks for it.

Now here's my quesiton.  If I change the statement

l <- list(s1,s2,s3,s4,fun=mean)
to
l <- list(s1=s1,s2=s2,s3=s3,s4=s4,fun=mean) # similar to Thiago's models.list

I get an error with missing "overlay" function for signature
"missing","missing".  I tried to find some ways around it but have had
no luck.  This is due to R's S3/S4 object system and how function
arguments are passed, I think.  I don't understand the S4 system that
well.  Basically, how would I use a list with names in do.call with
raster::overlay?
On Wed, Dec 2, 2015 at 11:26 AM, Lo?c Dutrieux <loic.dutrieux at wur.nl> wrote: