Reputation: 1
I know the NAMESPACE file was created by Rcpp.package.skeleton()
. But why does Rcpp::compileAttributes()
rewrite the NAMESPACE file?
Upvotes: 0
Views: 166
Reputation: 368351
Welcome to StackOverflow. But in short: It doesn't.
Maybe you are calling something else that calls compileAttributes()
and another function. Doing it step by step demonstrates that compileAttributes()
does NOT modify the NAMESPACE
file.
edd@rob:~$ cd /tmp/
edd@rob:/tmp$ Rscript -e 'Rcpp::Rcpp.package.skeleton("demopkg")'
Creating directories ...
Creating DESCRIPTION ...
Creating NAMESPACE ...
Creating Read-and-delete-me ...
Saving functions and data ...
Making help files ...
Done.
Further steps are described in './demopkg/Read-and-delete-me'.
Adding Rcpp settings
>> added Imports: Rcpp
>> added LinkingTo: Rcpp
>> added useDynLib directive to NAMESPACE
>> added importFrom(Rcpp, evalCpp) directive to NAMESPACE
>> added example src file using Rcpp attributes
>> added Rd file for rcpp_hello_world
>> compiled Rcpp attributes
edd@rob:/tmp$ cd demopkg/
edd@rob:/tmp/demopkg$ md5sum NAMESPACE # compute a checksum
2629c850958ab6b8a458474be920afa5 NAMESPACE
edd@rob:/tmp/demopkg$ Rscript -e 'Rcpp::compileAttributes()'
edd@rob:/tmp/demopkg$ md5sum NAMESPACE # getting same checksum, no change
2629c850958ab6b8a458474be920afa5 NAMESPACE
edd@rob:/tmp/demopkg$
Upvotes: 1