0

I have a student in a university course who is unable to install the course package from github with RStudio here is her sessioninfo:

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                   LC_TIME=French_France.1252    
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
loaded via a namespace (and not attached):
[1] compiler_3.5.1 tools_3.5.1    yaml_2.2.0

and here is the output of the install command:

> install_github("ScPoEcon/ScPoEconometrics")
Downloading GitHub repo ScPoEcon/ScPoEconometrics@master
from URL https://api.github.com/repos/ScPoEcon/ScPoEconometrics/zipball/master
Installing ScPoEconometrics
"C:/PROGRA~1/R/R-35~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "C:/Users/cbuzy/AppData/Local/Temp/Rtmpa2Rw7x/devtools7e043f65f74/ScPoEcon-ScPoEconometrics-5553b41"  \
  --library="C:/Users/cbuzy/Documents/R/win-library/3.5" --install-tests 
* installing *source* package 'ScPoEconometrics' ...
Warning in file.copy(instdir, lockdir, recursive = TRUE, copy.date = TRUE) :
  problème lors de la copie de C:\Users\cbuzy\Documents\R\win-library\3.5\ScPoEconometrics\CITATION vers C:\Users\cbuzy\Documents\R\win-library\3.5\00LOCK-ScPoEcon-ScPoEconometrics-5553b41\ScPoEconometrics\CITATION: Permission denied
Warning in file.copy(instdir, lockdir, recursive = TRUE, copy.date = TRUE) :
  problème lors de la copie de C:\Users\cbuzy\Documents\R\win-library\3.5\ScPoEconometrics\datasets\corr50.csv vers C:\Users\cbuzy\Documents\R\win-library\3.5\00LOCK-ScPoEcon-ScPoEconometrics-5553b41\ScPoEconometrics\datasets\corr50.csv: Permission denied

... and so on for all the files in the installation. it ends with

Warning in file(file, if (append) "a" else "w") :
  impossible d'ouvrir le fichier 'C:/Users/cbuzy/Documents/R/win-library/3.5/ScPoEconometrics/DESCRIPTION' : Permission denied
Error in file(file, if (append) "a" else "w") : 
  impossible d'ouvrir la connexion
ERROR: installing package DESCRIPTION failed for package 'ScPoEconometrics'
* removing 'C:/Users/cbuzy/Documents/R/win-library/3.5/ScPoEconometrics'
* restoring previous 'C:/Users/cbuzy/Documents/R/win-library/3.5/ScPoEconometrics'
In R CMD INSTALL
Installation failed: Command failed (1)

at some point is suggested to delete the referenced lock file. upon doing that here R went completely crazy (even the GUI), so that didn't work. i understand there is a permissions problem. How to address that?

Florian Oswald
  • 5,054
  • 5
  • 30
  • 38
  • 1
    Perhaps your student can try the suggestions at this question https://stackoverflow.com/questions/42807247/r-installing-package-cannot-open-file-permission-denied [thanks @r2evans for flagging the wrong link I had posted earlier] – Weihuang Wong Sep 22 '18 at 16:09
  • Si c'est un problème de `install_github` elle peut télécharger le repo github et installer. – Stéphane Laurent Sep 24 '18 at 09:46

0 Answers0