From geyer at umn.edu  Fri Jan 13 20:25:45 2017
From: geyer at umn.edu (Charles Geyer)
Date: Fri, 13 Jan 2017 13:25:45 -0600
Subject: [Rd] calling native routines in another package (Sec 5.4.2 of
	Writing R Extensions)
Message-ID: <CAKctRd32RUVntt4GD4G4DyzXwXPu4Vg4cmexO4T0ZpuW8v77CQ@mail.gmail.com>

I just (apparently) figured out how to do the stuff described in
Section 5.4.2 of
Writing R Extensions.  I put my test toy packages on github
<https://github.com/cjgeyer/linkingTo> for anyone to copy.  If anyone
cares to read the README and the bits of code it links to and tell me
anywhere I am wrong, I would be grateful.

But the main point of this e-mail is a complaint about that section of
Writing R Extensions.  It says (even in R-devel) "A CRAN example of
the use of this mechanism is package lme4, which links to Matrix." but
that does not appear to be true anymore.  I cannot see any inclusion
of headers from Matrix in lme4 nor any call to R_GetCCallable.  I did
find the file inst/include/Matrix_stubs.c in the Matrix package
somewhat helpful (although mystifying at first).

So this can be considered a documentation bug report (if I am
correct).  Do I need to do an official bugzilla one?

Just a further check.  lme4 (1.1-12) does not have Matrix in the
LinkingTo field of its DESCRIPTION file, so headers from Matrix cannot
be used.  And

    grep R_Get *.[ch]*

in the src directory of lme4 returns nothing.



[Rd] calling native routines in another package (Sec 5.4.2 of Writing R Extensions)
Charles Geyer