DistanceDevelopment / distance-bugs

A place to keep bugs in Distance
http://distancesampling.org/Distance
1 stars 0 forks source link

D7B1 calls to "install.distance.packages()" #144

Closed erex closed 7 years ago

erex commented 9 years ago

Laura

Working on my home computer on the dsm spotted dolphins project, D7B1 starts up with this sequence

> source('C:\\Program Files (x86)\\Distance 7\\support.r')
> source('C:\\Program Files (x86)\\Distance 7\\dsm.support.r')
> install.distance.packages(dir='C:\\Program Files (x86)\\Distance 7\\RPackages\\')
Installing package into 'C:/Users/erexstad/Documents/R/win-library/3.2'
(as 'lib' is unspecified)
package 'sp' successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package 'sp'

This is an improvement over the previous run where the argument force=T was imposed in install.distance.packages() leading to a larger raft of errors even though

Re-install analysis engine libraries to original versions on next run was not selected. My question is under what conditions is install.distance.packages() called? Seems it is called too often and creating some errors regarding removal of prior installations.

erex commented 9 years ago

Brand new computer that has never seen R or Distance before. Installed R, installed Distance, chose the Gulf of Mexico dolphin project to run.

Able to fit a ddf (R packages install fine). When trying to run dsm(), problems arise (caused by install.distance.packages()). Nothing unique about the project, simply the dolphins.dst project that ships in Sample Projects with D7B1. Log window contents as follows:

R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

> source('C:\\Program Files (x86)\\Distance 7\\support.r')
> source('C:\\Program Files (x86)\\Distance 7\\dsm.support.r')
> install.distance.packages(dir='C:\\Program Files (x86)\\Distance 7\\RPackages\\')
Installing package into 'C:/Users/Eric/Documents/R/win-library/3.2'
(as 'lib' is unspecified)
package 'digest' successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package 'digest'
> library(dsm)
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-6. For overview type 'help("mgcv-package")'.
Loading required package: mrds
This is mrds 2.1.13
Built: R 3.2.1; ; 2015-07-08 11:47:02 UTC; windows
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'digest'
Error: package or namespace load failed for 'dsm'
Execution halted

-- End of Analyis Engine Log File -- 
Analysis engine status 'Errors' 
Reading Results 
Could not read the results file.  Results not saved. 
Run finished 
erex commented 9 years ago

Further discoveries about install.distance.packages() on the brand new computer of Thursday 30 July. The digest package was not installed correctly when Distance did the job the first time; ![capture](https://cloud.githubusercontent.com/assets/330744/9045919/13bcf2e8-3a1f-11e5-887d-4ce6b87620ac.PNG even though the digest.0.6.8.zip is properly located in the RPackages directory under Distance 7.0

Somehow, digest was improperly installed. !?

Deleting the digest folder under win-library and rerunning the dsm analysis of the dolphin project, all runs fine.

Unresolved question is why the installation of the digest package failed in the first instance.

dill commented 9 years ago

The only thing I can think of here is that the .zip file has been corrupted somehow. Have you tried installing this .zip in a regular R session?

On 03/08/2015 20:39, erex wrote:

Further discoveries about |install.distance.packages()| on the brand new computer of Thursday 30 July. The |digest| package was not installed correctly when Distance did the job the first time; ![capture](https://cloud.githubusercontent.com/assets/330744/9045919/13bcf2e8-3a1f-11e5-887d-4ce6b87620ac.PNG even though the digest.0.6.8.zip is properly located in the RPackages directory under Distance 7.0

Somehow, |digest| was improperly installed. !?

Deleting the digest folder under win-library and rerunning the dsm analysis of the dolphin project, all runs fine.

Unresolved question is why the installation of the digest package failed in the first instance.

— Reply to this email directly or view it on GitHub https://github.com/DistanceDevelopment/distance-bugs/issues/144#issuecomment-127382978.

erex commented 9 years ago

Yes, when blowing away "bad" digest, and reinstalling, all is well.

However, I'm being a guinea pig that is trying to get the software to work the first time; Joe Bloggs will get stuck like I did when digest does not install correctly.

dill commented 9 years ago

When you say reinstalling you mean reinstalling from CRAN or that original .zip that is shipped with DISTANCE? Is it possible to reinstall without removing the digest folder?

On 06/08/2015 08:02, erex wrote:

Yes, when blowing away "bad" |digest|, and reinstalling, all is well.

However, I'm being a guinea pig that is trying to get the software to work the first time; Joe Bloggs will get stuck like I did when |digest| does not install correctly.

— Reply to this email directly or view it on GitHub https://github.com/DistanceDevelopment/distance-bugs/issues/144#issuecomment-128271817.

erex commented 9 years ago

Simply asking D7 to reinstall after removing folder. Cannot reinstall without first removing: see error thrown:

Warning: cannot remove prior installation of package 'digest'
LHMarshall commented 7 years ago

We now provide documentation on this issue and a warning to the user on the log window telling them where to look if there are problems installing R libraries.