[Rcpp-devel] Local .h files and Rcpp attributes

Romain Francois romain at r-enthusiasts.com
Sun Oct 20 10:39:28 CEST 2013


Le 19/10/13 22:06, JJ Allaire a écrit :
> For it to actually work though we'd need to modify Makevars as well (as
> Romain pointed out) so that the RcppExports.cpp could see the include
> file.

IMO, R should do this. R should recognize that a package has a 
inst/include directory and automatically set the -I flag.

Maybe it is something that can be negociated with the core team.

> This might get trickly. My thought was that we should either
> generate a fully working solution or failing that generation enough
> pointers/documentation to get most users over the hump.
>
> J
 >
> On Sat, Oct 19, 2013 at 3:56 PM, Dirk Eddelbuettel <edd at debian.org
> <mailto:edd at debian.org>> wrote:
>
>
>     On 19 October 2013 at 15:40, JJ Allaire wrote:
>     |
>     |     Maybe you could follow the example of Rcpp.package.skeleton()
>     and just drop
>     |     an empty yet amply commented file there?  By "being there"
>     users have a
>     |     better chance of stumbling over it :)
>     |
>     |
>     | Since this would involve creating a new directory (inst/include)
>     perhaps I
>     | could instead emit comments at the top of RcppExports.cpp
>     explaining the
>     | mechanism?
>
>     True, but maybe I'd still go for it.  inst/include/ is after all the
>     place
>     via which a any package foo can provide its headers to another
>     package bar
>     which simply adds 'LinkingTo: foo'.
>
>     Currently, the 'cost' of attributes is one extra RcppExports.R, one
>     RcppExports.cpp and we'd add a new (small, few lines with comments)
>     header
>     file in a new directory.  Seems fair to me -- but entirely your call.
>
>     Restraint in not cluttering user systems is also a good thing. We'd
>     be back
>     to the need for more/better documentation though.
>
>     Dirk
>
>     --
>     Dirk Eddelbuettel | edd at debian.org <mailto:edd at debian.org> |
>     http://dirk.eddelbuettel.com
>
>


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30



More information about the Rcpp-devel mailing list