[Rd] modifying some package code

Simon Urbanek simon.urbanek at r-project.org
Thu May 24 18:58:15 CEST 2012


On May 24, 2012, at 12:25 PM, Charles Determan Jr wrote:

> Greetings,
> 
> I am working on modifying some code from the nlme package.  I have had many
> discussions on the mixed models mailing list and have been directed to
> simply 'hack' the source code to have the degrees of freedom generated by
> one function to use in the output of another function that doesn't generate
> them.  My current holdup is an error regarding a .c file called
> 'inner_perc_table' called by the .C function.  The error states that the
> object 'inner_perc_table' is not found.  My confusion lies in the fact that
> when I run the original script, it recognizes the part just fine.  At no
> point is the object defined and I cannot currently find such a code in the
> package's source.  Perhaps someone here is familiar with the nlme package
> and could assist me in some form.  If you need further information, please
> ask as I don't know if there is a general answer for this type of question
> or if you will need the actual code.
> 

The (unexported) object contains cached reference to the native function (see ?getNativeSymbolInfo) and is defined by R_registerRoutines in src/init.c. This is a typical optimization in R packages to avoid costly lookup of symbols and to provide check for native arguments.

Cheers,
Simon



More information about the R-devel mailing list