Skip to content

look at the underlying source code

4 messages · jaimie villanueva, Rui Barradas, R. Michael Weylandt +1 more

#
Hello,

There are two simple ways,

1. Type  the function name without parenthesis at an R prompt;
2. Download the source from CRAN or R-Forge, R is open source.

Hope this helps,

Rui Barradas

jaimie villanueva wrote
--
View this message in context: http://r.789695.n4.nabble.com/look-at-the-underlying-source-code-tp4630532p4630538.html
Sent from the R help mailing list archive at Nabble.com.
#
Unfortunately the task is slightly harder here -- ugarchsim calls a
network of S4 code that is a little hard to trace....

You can get started by typing

getMethod("ugarchsim", "uGARCHfit")

to see the first step which calls a variety of functions with names like

.sgarchsim

You'll have to read a line of code here that uses switch so it's a
little harder to follow if you've never used that construct before
than method dispatch or if/then might be.

It looks like these are not exported so you'll have to use

getAnywhere(.sgarchsim)

to start following those. It looks like that in turn calls .sgarchsim1
or .sgarchsim2 which are the end of the line and should help you out.

Hope this helps,
Michael
On Fri, May 18, 2012 at 2:16 PM, Rui Barradas <ruipbarradas at sapo.pt> wrote:
#
On 12-05-18 12:56 PM, jaimie villanueva wrote:
See Uwe Ligges's article in R News,

Accessing the sources. Uwe Ligges, R News, 6(4):43-45, October 2006

There's a link to it in the "Technical Papers" section of the HTML help 
pages.

Duncan Murdoch