[R] a REALLY dumb question

Erin Hodgess erinm.hodgess at gmail.com
Fri Oct 3 22:15:09 CEST 2014


Wow!  Never thought of trace! (obviously)

thanks!

On Fri, Oct 3, 2014 at 3:03 PM, Greg Snow <538280 at gmail.com> wrote:

> Instead of making a local copy and editing, you may consider using the
> trace function with edit=TRUE, this allows you to insert things like
> print statements, but takes care of the environment and other linkages
> for you (and is easy to untrace when finished).
>
> On Fri, Oct 3, 2014 at 11:12 AM, Erin Hodgess <erinm.hodgess at gmail.com>
> wrote:
> > 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]]
> >
> > ______________________________________________
> > R-help at r-project.org 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.
>
>
>
> --
> Gregory (Greg) L. Snow Ph.D.
> 538280 at gmail.com
>



-- 
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