On 03/10/2014 12:09 PM, Erin Hodgess wrote:
So please be prepared...
Ok. I made a copy of the arima.r function called earima.r to put in some
print statements. Fair enough.
Now when I run earima, the .Call statements call find the C subroutines.
I know that this should be a really simple fix, but I don't know how. I do
know that the original arima function is in stats.
Sorry for the trouble.
If you run
environment(arima) <- environment(stats::arima)
it should work (assuming your function is still called arima). The
problem is that statements like
.Call(C_ARIMA_Like, y, mod, 0L, TRUE)
refer to variables like C_ARIMA_Like, which are local to the package
environment of stats. They aren't exported, so your function (which
presumably has a different environment) can't see them.
Duncan Murdoch
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.