BiologicalRecordsCentre / sparta

Species Presence/Absence R Trends Analyses
http://biologicalrecordscentre.github.io/sparta/index.html
MIT License
21 stars 24 forks source link

Failure to install due to sysdata.rda warning #201

Open mlogie opened 3 years ago

mlogie commented 3 years ago

In installation of SPARTA on datalabs, Linux, I received the following message: Error in lazyLoadDBinsertVariable(vars[i], from, datafile, ascii, compress, : (converted from warning) internal error 10 in R_compress3 ERROR: unable to build sysdata DB for package ‘sparta’ * removing ‘/usr/local/lib/R/site-library/sparta’

After a bit of googling I found this solution (here https://github.com/r-lib/remotes/issues/374) which works: withr::with_envvar(c(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true"), remotes::install_github('BiologicalRecordsCentre/sparta'))

I'm not sure why, but thought I'd report this in case this comes up again.

mlogie commented 3 years ago

An update here: I just installed SPARTA to a fresh notebook (Linux again) and hit the same error. Ran the code above, and it worked fine. So either this was an existing issue on Linux, or it's a new change with new R version. Might be worth mentioning this workaround in the ReadMe @AugustT ?

AugustT commented 3 years ago

@mlogie I think we should be able to solve the issue. It seems to stem from the sysdata file. It might be that there has been some change in R recently that means this file no longer works. The sysdata file is 6 years old, so I think a good first step would be to load that file into R and have a look at it, see if there is anything obviously wrong and if not save with he most recent version of R. Can you also drop the session info from your linux session here so we can see the versions of things being used?