Skip to content
Prev 45679 / 63424 Next

Help: Where can I find the code for 'C_Cdqrls'?

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: