[R] a REALLY dumb question
Erin Hodgess
erinm.hodgess at gmail.com
Fri Oct 3 19:12:18 CEST 2014
thank you!!
On Fri, Oct 3, 2014 at 12:18 PM, Duncan Murdoch <murdoch.duncan at gmail.com>
wrote:
> 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
>
--
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com
[[alternative HTML version deleted]]
More information about the R-help
mailing list