Skip to content
Prev 10137 / 29559 Next

gridded time series analysis

Martin,

I think the problem is whith the lm function that returns an error
rather than NA:
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
  0 (non-NA) cases

#rather than something like this:
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
  0 (non-NA) cases

#you could catch this in your function and do something like:
[1] NA


and then:

calc(s, fun=fun)

lm and relatives have an na.action argument but I do not think that
can come to the rescue here.

Roberrt
On Sun, Nov 28, 2010 at 4:33 AM, Martin <martin_brandt at gmx.net> wrote: