I am building R package in R version 3.1.3, but whenever i try to install it I get the following error message;
* installing *source* package ‘SPO’ ...
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
Error : argument "data" is missing, with no default
Error : unable to load R code in package ‘SPO’
ERROR: lazy loading failed for package ‘SPO’
* removing ‘/home/evans/Desktop/SPO.Rcheck/SPO’
Kindly any help on how to fix lazy loading problem will be highly appreciated. Thank you.
In my case, I found an inactive/unused R file in the R folder of the package I wanted to build.
Once I deleted/removed this file, I was able to build the package.
This error message also occurs if you have uncommented code in the function file that is outside of the function definition.
The solution is to comment out, or delete, the code that is not inside your function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With