First, it is not a function. It is an R object in the stats namespace and you can look at it like any other object:

> stats:::C_Cdqrls
$name
[1] "Cdqrls"

$address
<pointer: 0x7f8483499750>
attr(,"class")
[1] "RegisteredNativeSymbol"

$dll
DLL name: stats
Filename: /Users/ripley/R/R-devel/library/stats/libs/stats.so
Dynamic lookup: FALSE

$numParameters
[1] 3

attr(,"class")
[1] "CallRoutine"      "NativeSymbolInfo"

That tells you it is invoking a C function called Cdqrls: you can search from that in the sources for package stats. In fact it is in src/library/stats/src/lm.c .

You would know to look in the stats namespace since you found this in a function from that namespace.

Generally R's own code uses the convention of object C_foo for C entry point foo and F_bar for Fortran entry point bar (but there are exceptions, more so in R < 3.0.0).


On 23/04/2013 08:35, 赵自强 wrote:
Dear all,

                 I’m not sure if it is O.K. to ask this question here.

                 But where can I find the code for the function ‘C_Cdqrls’ 
which is called by the R function ‘lsfit‘.

                 Thank you all.

                 Sorry for being naïve if so.

--------------------

Ziqiang Zhao

2013-04-23




        [[alternative HTML version deleted]]



______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to