Robert, How can I define parameters in the functions within overlay() ? For example:
> fun3 = function(x,y) {a=-1.1867422 s=1.0287373 return((y-(a+s*x))/sqrt(s^2+1))} > NmaxDev = > overlay(bN1999max,bN2009max,fun=fun2,filename="NmaxDev",overwrite=TRUE,format="EHdr",datatype='FLT4S', > NAflag=0) want it to be something like: > fun3 = function(x,y,a,b) {return((y-(a+s*x))/sqrt(s^2+1))} > NmaxDev = > overlay(bN1999max,bN2009max,fun=fun2(a=-1.1867422,s=1.0287373),filename="NmaxDev",overwrite=TRUE,format="EHdr",datatype='FLT4S', > NAflag=0) Is it possible or should I redefine the function every time? Agus _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo