Error in setValues(out, x)

Hi. I'm trying to average multiple raster files by the following code:
list= list.files(path = mydir, pattern = "*.tif$")
stck.ppt= stack(list)
mean.ppt = calc(stck.ppt, fun = mean)

But I keep on getting the following error:
Error in setValues(out, x) :
could not find symbol "values" in environment of the generic function
Please tell me what I can do

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.