Sth wrong when install packages


#1

I find sth wrong when install some packages(not all)

when I install mboost
unable to move temporary installation ‘C:\Users\user\Documents\R\win-library\3.4\file1d1851ca54f9\mboost’ to ‘C:\Users\user\Documents\R\win-library\3.4\mboost’
The downloaded binary packages are in
C:\Users\user\AppData\Local\Temp\RtmpsBbLm3\downloaded_packages

I have to install from downloaded package

install.packages(“C:/D/mboost_2.8-1.zip”, repos = NULL, type = “win.binary”)
and then done.


But when I install coin package, install from downloaded package also error.

But, when I have to install with R(not Rstudio), succeed!!


#2

How are you installing your packages? I’m guessing install.packages() is the answer, but wanted to double check.

What do you get when you run .libPaths() in R vs. in RStudio?

What version of Windows are you using?

You might want to take a look at this StackOverflow question for some possibilities on changing your default installation location:


#3

Hi,

Yes of course I use install.packages() in Rstudio and R(RGui 64bit)

.libPaths() will get

[1] “C:/Users/user/Documents/R/win-library/3.4”
[2] “C:/Program Files/R/R-3.4.2/library”

Both in Rstudio and R, the same result


My windows 10 is Windows 10 Pro 1709, OS build 16299.64

Actually, I’m wondering what does this mean

While I didn’t encounter such problems in R with the same command.


#4

I’m not a Windows user, but, in addition to the suggestions from the SO question, you might try manually setting destdir when you install.

Not sure if this has changed in the time since @kevinushey fielded this Q, though.


#5

So you mean I should install all my packages to

“C:/Program Files/R/R-3.4.2/library”

and not the user/Documents/Rxxxx category?

OK, I will set that as default.


#6

I’m not 100% sure, honestly. Just pointing to resources, as I don’t use Windows.


#7

I have had that error, and in my case it was caused by malware protection. Some anti-virus software has a problem with moving from a temporary installation to a permanent one. That said, I’m not sure why RGUI would work when RStudio doesn’t, so it’s entirely possible that your error is caused by something else - just wanted to share one possibility that I’d run across.