0

I am fairly new to R, and am encountering an error that has been throwing me for a loop. I've used R before, however this error is occurring on a different machine than what I've used in the past. I have never encountered this error before, either. After installing the tidyverse package with:

install.package("tidyverse")

Some of the messages that appear during installation are:

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/xml2_1.1.1.zip'
Content type 'application/zip' length 3529738 bytes (3.4 MB)
downloaded 3.4 MB

trying URL 
'https://cran.rstudio.com/bin/windows/contrib/3.4/tidyverse_1.2.1.zip'
Content type 'application/zip' length 82408 bytes (80 KB)
downloaded 80 KB

package ‘colorspace’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  unable to move temporary installation ‘C:\Users\Harbour\Documents\R\win-
library\3.4\file38019bc1be5\colorspace’ to 
‘C:\Users\Harbour\Documents\R\win-library\3.4\colorspace’
package ‘backports’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  unable to move temporary installation ‘C:\Users\Harbour\Documents\R\win-
library\3.4\file38060ec26d3\backports’ to ‘C:\Users\Harbour\Documents\R\win-
library\3.4\backports’

(This is not everything, however it shows warning messages which give context to what's happening during installation). I then attempt to load tidyverse with:

library(tidyverse)

However, I keep getting the error:

Error in library(tidyverse) : there is no package called ‘tidyverse’

I have been unable to find a fix after hours of googling, uninstalling and reinstalling, etc. If I type the following:

.libPaths()

The following is returned:

[1] "C:/Users/Harbour/Documents/R/win-library/3.4" "C:/Program Files/R/R-
3.4.3/library"  

I fear I will soon lose sanity, so any and all help input anyone has is very much appreciated. Thanks!

rh341414
  • 1
  • 1
  • Are you logged in as the `Harbour` user? Do you have permissions to write to the `C:/Users/Harbour/Documents/R/win-library/3.4` folder? Does the folder `C:\Users\Harbour\Documents\R\win- library\3.4\backports` already exist? Does it have a different owner/permissions for some reason? – MrFlick Jan 10 '18 at 22:19
  • Or maybe the problem is anti-virus software? https://stackoverflow.com/a/5714458/2372064 – MrFlick Jan 10 '18 at 22:19
  • Thanks for the reply. I am logged in to the **Harbour** user. Checking the properties tells me I do have ownership and permission to write in **C:/Users/Harbour/Documents/R/win-library/3.4** . The folder **C:\Users\Harbour\Documents\R\win-library\3.4\backports** does not exist, the only files in **C:/Users/Harbour/Documents/R/win-library/3.4** are named like this **file380532d2a03** . There are 73 folders like that, and within them are folders named like **rprojroot** and **backports**, for example. – rh341414 Jan 11 '18 at 19:05
  • So it seems as though R is trying to change the location of the packages from this **C:\Users\Harbour\Documents\R\win-library\3.4\file38060ec26d3\backports** to this **C:\Users\Harbour\Documents\R\win-library\3.4\backports** , eliminating the **file38060ec26d3** type files that currently contain the packages. – rh341414 Jan 11 '18 at 19:08
  • Right. That's how R normally installs things. But something on your system is preventing the movement of that folder. The other answer I linked to suggested it might be anti-virus software that's incorrectly blocking R from making the move. – MrFlick Jan 11 '18 at 19:16

0 Answers0