Thanks for getting back to me.
If this line of code is in the namespace file when I try to install the package via packrat::install_local("meuk2") then I get the long error message below.
Installing package from 'C:/Users/fostert/Documents/R Working/meuk2'
Installing meuk2
"C:/PROGRA~1/R/R-31~1.0/bin/x64/R" --vanilla CMD INSTALL "C:\Users\fostert\Documents\R Working\meuk2" --library="P:/DIR/packrat/lib/x86_64-w64-mingw32/3.1.0" --install-tests
Error: Command failed (1)
The command failed with output:
* installing *source* package 'meuk2' ...
** libs
*** arch - i386
make: Nothing to be done for `all'.
installing to P:/DIR/packrat/lib/x86_64-w64-mingw32/3.1.0/meuk2/libs/i386
*** arch - x64
make: Nothing to be done for `all'.
installing to P:/DIR/packrat/lib/x86_64-w64-mingw32/3.1.0/meuk2/libs/x64
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Warning: package 'sp' was built under R version 3.1.3
Warning: package 'data.table' was built under R version 3.1.3
Warning: package 'rgdal' was built under R version 3.1.3
Warning: package 'rgeos' was built under R version 3.1.3
Warning: package 'raster' was built under R version 3.1.3
Warning: package 'gstat' was built under R version 3.1.3
** help
Warning: C:/Users/fostert/Documents/R Working/meuk2/man/meuk2-package.Rd:32: All text must be in
If I do not include the useDynLib(meuk2) line in the namespace file then Packrat installs the package, meuk2, without a problem. But then later on when I try to run my code it fails because meuk2 does not have the line that calls the Fortran code. That error message being:
Error in .Fortran("LS_aem_sub", as.double(P1), as.double(P2), as.double(X1), :
"ls_aem_sub" not available for .Fortran() for package "meuk2"
In addition: Warning message:
In alloc.col(X, length(NAMES)) :
Attempt to reduce allocation from 100 to 6 ignored. Can only increase allocation via shallow copy.
Thanks so much for your time in this matter,
Foster