ScPoEcon / ScPoEconometrics

Undergraduate textbook for Econometrics with R
https://ScPoEcon.github.io/ScPoEconometrics/
Other
142 stars 68 forks source link

Suspect problem of write permission for windows #87

Closed AnNguyen37 closed 6 years ago

AnNguyen37 commented 6 years ago

The problem appears when trying to install package in windows machine

install_github(repo = "ScPoEcon/ScPoEconometrics", force=TRUE)
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/Public/Documents/Wondershare/CreatorTemp/RtmpSM7KA9/devtools402c37e536fb/ScPoEcon-ScPoEconometrics-b7010e6"  \
 --library="C:/Users/driss/OneDrive/Documents/R/win-library/3.5" --install-tests

ERROR: failed to lock directory 'C:/Users/driss/OneDrive/Documents/R/win-library/3.5' for modifying
Try removing 'C:/Users/driss/OneDrive/Documents/R/win-library/3.5/00LOCK-ScPoEcon-ScPoEconometrics-b7010e6'
In R CMD INSTALL
Installation failed: Command failed (3)
floswald commented 6 years ago

I think this here gets pretty close: https://cran.r-project.org/bin/windows/base/rw-FAQ.html#Does-R-run-under-Windows-Vista_003f

floswald commented 6 years ago

The above FAQ points to this course of action. I think this is the first thing to try, and it's reasonably simple. Just install the R packages in a different location with write access. Like C:\RLibrary and set the environment variable R_LIBS as described here https://cran.r-project.org/bin/windows/base/rw-FAQ.html#I-don_0027t-have-permission-to-write-to-the-R_002d3_002e5_002e1_005clibrary-directory

can you give that a try with your student? This is not and issue with (our) R code.

AnNguyen37 commented 6 years ago

Dear Florian,

Thank you for your help. Today I have checked with my student and it seems to work.

Have a nice weekend,

Bests,

An Nguyen

On Fri, Oct 5, 2018, 10:51 PM Florian Oswald notifications@github.com wrote:

Closed #87 https://github.com/ScPoEcon/ScPoEconometrics/issues/87.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ScPoEcon/ScPoEconometrics/issues/87#event-1888091667, or mute the thread https://github.com/notifications/unsubscribe-auth/AorRZ2lYDQB-EmbG-_LiBWbIKdl3S1Zcks5uh8ZmgaJpZM4XAcCc .