Skip to content
Prev 367105 / 398506 Next

object of type 'closure' is not subsettable

A 'closure' is a function and you cannot use '[' or '[[' to make a
subset of a function.

You used
   forecast[d+1] <- ...
in one branch of the 'if' statement and
   forecasts[d+1] <- ...
in the other.  Do you see the problem now?

By the way, the code snippet in the error message says '[[d+1]]' but
the code you supplied has '[d+1]'.  Does the html mangling selectively
double brackets or did you not show us the code that generated that
message?

Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Sun, Feb 12, 2017 at 4:34 AM, Allan Tanaka <allantanaka11 at yahoo.com> wrote: