An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130320/d33cce48/attachment.pl>
How to look at the source code for predict()
9 messages · Yuan, Rebecca, R. Michael Weylandt, Duncan Murdoch +1 more
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130320/a3c2e89b/attachment.pl>
getS3method("predict", "arima")
Cheers,
MW
On Wed, Mar 20, 2013 at 6:43 PM, Yuan, Rebecca
<rebecca.yuan at bankofamerica.com> wrote:
Hello all,
I thought I found it, it is in the arima.R if I use arima to fit the model.
But how could we see the source code of some function in R?
Thanks,
Rebecca
From: Yuan, Rebecca
Sent: Wednesday, March 20, 2013 2:38 PM
To: R help
Subject: How to look at the source code for predict()
Hello,
I try to look at the source code of predict() it turns out that I cannot find it.
I can see it with debug(library), but not efficient.
Can someone help?
Thanks,
Rebecca
----------------------------------------------------------------------
This message, and any attachments, is for the intended r...{{dropped:5}}
______________________________________________ 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.
On Wed, Mar 20, 2013 at 6:49 PM, R. Michael Weylandt
<michael.weylandt at gmail.com> wrote:
getS3method("predict", "arima")
Pardon -- it's either "Arima" or "arima0" but not "arima" in this case. But, in general, getS3method is what you're looking for. Cheers, MW
On 20/03/2013 2:43 PM, Yuan, Rebecca wrote:
Hello all, I thought I found it, it is in the arima.R if I use arima to fit the model. But how could we see the source code of some function in R?
The information in the article by Uwe Ligges in this issue of R News: http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf is still valid. Duncan Murdoch P.S. I got that link from the R help system. Start HTML help, look at the "Technical Papers" link, and you'll find all sorts of good stuff.
Thanks,
Rebecca
From: Yuan, Rebecca
Sent: Wednesday, March 20, 2013 2:38 PM
To: R help
Subject: How to look at the source code for predict()
Hello,
I try to look at the source code of predict() it turns out that I cannot find it.
I can see it with debug(library), but not efficient.
Can someone help?
Thanks,
Rebecca
----------------------------------------------------------------------
This message, and any attachments, is for the intended r...{{dropped:5}}
______________________________________________ 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.
Hello MW, Thanks very much! I use
getS3method("predict","arima0")
And be able to see the source code. Have a great day! Cheers, Rebecca -----Original Message----- From: R. Michael Weylandt [mailto:michael.weylandt at gmail.com] Sent: Wednesday, March 20, 2013 2:52 PM To: Yuan, Rebecca Cc: R help Subject: Re: [R] How to look at the source code for predict()
On Wed, Mar 20, 2013 at 6:49 PM, R. Michael Weylandt <michael.weylandt at gmail.com> wrote:
getS3method("predict", "arima")
Pardon -- it's either "Arima" or "arima0" but not "arima" in this case.
But, in general, getS3method is what you're looking for.
Cheers,
MW
----------------------------------------------------------------------
This message, and any attachments, is for the intended r...{{dropped:2}}
Hello Duncan, Thanks for this link! A very good article that has useful information! Best, Rebecca -----Original Message----- From: Duncan Murdoch [mailto:murdoch.duncan at gmail.com] Sent: Wednesday, March 20, 2013 2:53 PM To: Yuan, Rebecca Cc: 'R help' Subject: Re: [R] How to look at the source code for predict()
On 20/03/2013 2:43 PM, Yuan, Rebecca wrote:
Hello all, I thought I found it, it is in the arima.R if I use arima to fit the model. But how could we see the source code of some function in R?
The information in the article by Uwe Ligges in this issue of R News: http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf is still valid. Duncan Murdoch P.S. I got that link from the R help system. Start HTML help, look at the "Technical Papers" link, and you'll find all sorts of good stuff.
Thanks,
Rebecca
From: Yuan, Rebecca
Sent: Wednesday, March 20, 2013 2:38 PM
To: R help
Subject: How to look at the source code for predict()
Hello,
I try to look at the source code of predict() it turns out that I cannot find it.
I can see it with debug(library), but not efficient.
Can someone help?
Thanks,
Rebecca
----------------------------------------------------------------------
This message, and any attachments, is for the intended...{{dropped:11}}
Hello, In the case of predict.Arima, you can type at an R prompt the following. stats:::predict.Arima Hope this helps, Rui Barradas Em 20-03-2013 18:43, Yuan, Rebecca escreveu:
Hello all,
I thought I found it, it is in the arima.R if I use arima to fit the model.
But how could we see the source code of some function in R?
Thanks,
Rebecca
From: Yuan, Rebecca
Sent: Wednesday, March 20, 2013 2:38 PM
To: R help
Subject: How to look at the source code for predict()
Hello,
I try to look at the source code of predict() it turns out that I cannot find it.
I can see it with debug(library), but not efficient.
Can someone help?
Thanks,
Rebecca
----------------------------------------------------------------------
This message, and any attachments, is for the intended r...{{dropped:5}}
______________________________________________ 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.
Hello Rui, This also works! Thanks so much! Cheers, Rebecca -----Original Message----- From: Rui Barradas [mailto:ruipbarradas at sapo.pt] Sent: Wednesday, March 20, 2013 3:34 PM To: Yuan, Rebecca Cc: 'R help' Subject: Re: [R] How to look at the source code for predict() Hello, In the case of predict.Arima, you can type at an R prompt the following. stats:::predict.Arima Hope this helps, Rui Barradas Em 20-03-2013 18:43, Yuan, Rebecca escreveu:
Hello all,
I thought I found it, it is in the arima.R if I use arima to fit the model.
But how could we see the source code of some function in R?
Thanks,
Rebecca
From: Yuan, Rebecca
Sent: Wednesday, March 20, 2013 2:38 PM
To: R help
Subject: How to look at the source code for predict()
Hello,
I try to look at the source code of predict() it turns out that I cannot find it.
I can see it with debug(library), but not efficient.
Can someone help?
Thanks,
Rebecca
----------------------------------------------------------------------
This message, and any attachments, is for the intended...{{dropped:12}}