Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • I´m trying like this: fun2 <- function(x) { v=as.vector(x) z=na.spline(v) s1.ts2 = ts(v, start=c(2013,14), end=c(2016,19), frequency=44) x=sgolayfilt(s1.ts2) } s1<-calc(rasterstack, fun2) But when I call s1, the follow error appears: Error in .calcTest(x[1:5], fun, na.rm, forcefun, forceapply) : cannot use this function What dou think it is happening? Thank again! Commented Jun 24, 2016 at 19:00
  • 1
    Follow the (testing) steps in the link I provided. If that does not work, ask a new question Commented Jun 24, 2016 at 21:08