[R] modifying a built in function from the stats package (fixing arima)
Carlos J. Gil Bellosta
cgb at datanalytics.com
Tue Mar 3 21:29:39 CET 2009
Hello,
I do not think that is the way to go. If you believe that your algorithm
is better than the existing one, talk to the author of the package and
discuss the improvement. The whole community will benefit.
If you want to tune the existing function and tailor it to your needs,
you have several ways to go, among them:
1) Copy the existing function into a new file, edit it and load it via
source.
2) Download the source package and modify it for your own purposes.
Best regards,
Carlos J. Gil Bellosta
http://www.datanalytics.com
On Tue, 2009-03-03 at 18:20 +0100, Marc Anonym wrote:
> Dear members of the list,
>
> I'm a beginner in R and I'm having some trouble with: "Error in
> optim(init[mask], armafn, method = "BFGS", hessian = TRUE, control =
> optim.control, :
> non-finite finite-difference value [8]"
>
> when running "arima".
>
> I've seen that some people have come accross the same problem:
> https://stat.ethz.ch/pipermail/r-help/2008-August/169660.html
>
> So I'd like to modify the code of arima to change the optimization function
> with another one that handles these problems automatically , however I don't
> find the way to do it and
> http://tolstoy.newcastle.edu.au/R/e6/help/09/01/2476.html points out a way
> that doesn't work for me:
>
> * If I type edit(arima) and I modify it, changes are not saved,
> * If I copy the code and I save it like a different function, I get the hard
> error: "Error in Delta %+% c(1, -1) : object "R_TSconv" not found"
>
> Anybody can give me a hint? I miss matlab's easy way of doing this ("edit
> function.m").
>
> Thanks in advance
>
> MarC (Acompany)
>
> [[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.
More information about the R-help
mailing list