PigWolf PigWolf - 1 year ago 151
R Question

Error in loadNamespace Rstudio

I am having real trouble understanding what my problem is installing ggplot package in Rstudio. I have tried a number of the post here and here but I still can't fix the problem.

I understand that I have a library directory on my Windows machine which can be found using:

which returns
[1] "C:/Users/Bo Bo/Documents/R/win-library/3.2" "C:/Program Files/R/R-3.2.3/library"

I'm not sure what is stored in this directory using .Library but it looks to be pointing to the wrong directory, 3.2.3 and 32~1.3???:

[1] "C:/PROGRA~1/R/R-32~1.3/library"

Upon installing ggplot2


Installing package into ‘C:/Users/Bo Bo/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/ggplot2_2.1.0.zip'
Content type 'application/zip' length 2001769 bytes (1.9 MB)
downloaded 1.9 MB

package ‘ggplot2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\Bo Bo\AppData\Local\Temp\Rtmp4QKdwV\downloaded_packages

So is it dumping the package in a temp directory because the 'lib' is unspecified? If so how do I specify the 'lib' and which library needs to change.

By the way I followed @Paweł Rumian post in link 2 above meaning I have a new User variable called R_LIBS_USER pointing to C:/Program Files/R/R-3.2.3/library

Can anyone make a suggestion as to how I can resolve this conflict and move on with my life :)

Answer Source

So I ended up re-installing windows after hours of trying to modify/fix the permissions issue I was having with all folders on the local disk.

Since re-installing I have installed Rstudio as per before and I am back in business, no messing around with library locations, just plain vanilla for me please...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download