Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D7R1 candidate -- install.distance.r failure on vanilla machine #166

Open
lenthomas opened this issue Jun 13, 2016 · 2 comments
Open

D7R1 candidate -- install.distance.r failure on vanilla machine #166

lenthomas opened this issue Jun 13, 2016 · 2 comments

Comments

@lenthomas
Copy link
Member

Situation: Vanilla Windows 7, vanilla R (crucially: that has had no additional packages installed on it), fresh install of D7R1. Try to Run an MRDS analysis, which causes Distance to try to install packages.

Issue: error

source('C:\Program Files (x86)\Distance 7\support.r')
source('C:\Program Files (x86)\Distance 7\mrds.support.r')
install.distance.packages(dir='C:\Program Files (x86)\Distance 7\RPackages')
Warning in install.packages(paste(dir, "", file.name, sep = ""), repos = repos) :
'lib = "C:/Program Files/R/R-3.3.0/library"' is not writable
Error in install.packages(paste(dir, "", file.name, sep = ""), repos = repos) :
unable to install packages
Calls: install.distance.packages -> install.packages
Execution halted

The problem here is that R cannot write to the Program Files directory. When installing packages in R Windows interactively, at this point, the install.packages function asks the user if they wish to create a library folder in their own local directory -- but when not running interactively it just stops with an error. A workaround is simply to open R in Windows and try to install any package from CRAN using the R GUI menu Packages | Install packages; pick any package and then you get the prompt to create the local library directory. But clearly this is not a good longterm solution. Working out what's best to do is a bit tricky, and will require some thought to come up with a watertight solution. For some starting info, see the R Windows faq item "4.2 I don’t have permission to write to the R-3.3.0\library directory" and also the R help for install.packages.

@erex
Copy link
Member

erex commented Jun 13, 2016

This is also documented on the software website at
http://distancesampling.org/Distance/old-versions/d62-r-install-details.html
but in the context of D6.2 rather than more generically

@erex
Copy link
Member

erex commented Jun 14, 2016

Happy with the idea of getting more material online and less associated with software distribution. Could readily make ReadMe into markdown, but not likely before this release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants