You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing an R package that uses an Rcpp backend for analysis, I would like to add support for plink pgen/pvar files. One option is to copy the code from the pgenlibr/src into my own package. But this 1) requires manual updates when pgenlibr changes and 2) doesn't address the issue for other package developers.
But there is an easy fix. Files in inst/include are retained in the path to the installed R package (code in src is not). This allows a package developer to link to C/C++ code distributed by other R packages.
In the pgenlibr package, this just involves moving the symlinks to include/, libdeflate/, simde/, and zstd/ from src/ to inst/include/. And updating the Makefile to include -I../inst/include/.
I tried it and it works great. Would you be interested in this update or including a merge request?
Best,
Gabriel
The text was updated successfully, but these errors were encountered:
Thank you for
plink2
and thepgenlibr
library.I am writing an R package that uses an
Rcpp
backend for analysis, I would like to add support for plink pgen/pvar files. One option is to copy the code from thepgenlibr/src
into my own package. But this 1) requires manual updates whenpgenlibr
changes and 2) doesn't address the issue for other package developers.But there is an easy fix. Files in
inst/include
are retained in the path to the installed R package (code insrc
is not). This allows a package developer to link to C/C++ code distributed by other R packages.In the
pgenlibr
package, this just involves moving the symlinks toinclude/
,libdeflate/
,simde/
, andzstd/
fromsrc/
toinst/include/
. And updating theMakefile
to include-I../inst/include/
.I tried it and it works great. Would you be interested in this update or including a merge request?
Best,
Gabriel
The text was updated successfully, but these errors were encountered: