1

I want to see, how sctest of the strucchange package is implemented.

I install and load the package:

install.packages("strucchange")
library(strucchange)

Now I want to look at the implementation and I do:

sctest

But this gives only

> sctest
function (x, ...) 
{
    UseMethod("sctest")
}
<environment: namespace:strucchange>

So I tried getAnywhere(sctest), but this does also not help me. So how can I look at the code?

I looked at Looking at internal Methods and the R Inferno.

EDIT: I tried

 methods(sctest) 

this gives me

[1] sctest.efp*     sctest.formula* sctest.Fstats*  sctest.gefp*   

   Non-visible functions are asterisked

Now I can use getAnywhere() but which of these functions is the right one for me?

Community
  • 1
  • 1
Jen Bohold
  • 1,038
  • 2
  • 10
  • 17
  • 1
    Use `getAnywhere` with the suffix you need, eg. `getAnywhere( sctest.efp )` the method depends on the object you are passing to `sctest`. – Simon O'Hanlon May 19 '13 at 09:53
  • 1
    possible duplicate of [Looking at internal Methods](http://stackoverflow.com/questions/5835312/looking-at-internal-methods), http://stackoverflow.com/questions/15579100/how-to-view-r-source-code/15579274#15579274 and http://stackoverflow.com/questions/11371928/view-the-source-of-an-builtin-r-package/11372006#11372006 – Ari B. Friedman May 19 '13 at 10:42

0 Answers0