[Rd] inheriting C symbols

Terry Therneau therneau at mayo.edu
Wed Aug 5 21:24:48 CEST 2009


Thanks for the information.  I'd looked through the manual but missed
this.  Follow-up questions

1. I'd never paid much attention to that whole "register routines"
section of the manual because a) it didn't seem necessary (my code
worked anyway) and b) it's quite complex.  Your answer is that if I dig
into it, there is a way to export routines.  Is there any other real
advantage to registration?

2. The simpler method is to use a local=FALSE argument to dyn.load.
Since it wasn't mentioned, I'll assume that there is no way to add text
to the DESCRIPTION file saying "and load the symbols too"?  It would be
much simpler.  Also a bit more dangerous of course, since function
prototypes are not being exported via a header.

  Terry T


On Wed, 2009-08-05 at 11:54 -0500, Jeff Ryan wrote:
> This has been discussed before:
> 
> http://www.nabble.com/Dynamic-linking-to-binary-code-from-other-packages---td20167535.html#a20474561
> 
> Take a look at 'xts' on cran, or R-forge.  Specifically:
> 
> http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/inst/api_example/README?rev=386&root=xts&view=markup
> 
> HTH
> Jeff
> 
> On Wed, Aug 5, 2009 at 11:29 AM, Terry Therneau<therneau at mayo.edu> wrote:
> > The package coxme depends heavily on bdsmatrix, to the point of needing
> > access to some of its C calls.  The kinship package (in progress) uses
> > the R level functions in bdsmatrix, but not the C calls.  That is, I
> > don't want to always export the symbols.
> >
> > For testing I can use an explicit dyn.load('somepath/bsdmatrix.so',
> > local=F).  How do I incorporate such a dependency in the DESCRIPTION
> > file for coxme, so that it happens in general?
> >
> > Terry T.
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> 
> 
>



More information about the R-devel mailing list