Reputation: 21
I'm trying to install Tidytext package. It seems to me that R is installing the package into my OneDrive. I've been using R and I've not run into this problem before. I've unsynchronized One Drive and done a variety of things to change my working drive, but I still get the following message when installing Tidytext package -
Installing package into "C:/Users/Anjan/OneDrive/Documents/R/win-library/3.5" (as "lib" is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tidytext_0.2.0.zip' Content type 'application/zip' length 2836849 bytes (2.7 MB) downloaded 2.7 MB
I've unsynchronized One Drive from my Documents folder on This PC. I've checked getwd() I've set setwd() I've used Tools and Global Options and changed my working directory.
But R still uses One Drive. How do I get R to not use One Drive?
install.packages("tidytext") Installing package into "C:/Users/Anjan/OneDrive/Documents/R/win-library/3.5" (as "lib" is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tidytext_0.2.0.zip' Content type 'application/zip' length 2836849 bytes (2.7 MB) downloaded 2.7 MB
package ‘tidytext’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\Anjan\AppData\Local\Temp\RtmpYDylTE\downloaded_packagesinstall.packages("magritte") Installing package into "C:/Users/Anjan/OneDrive/Documents/R/win-library/3.5" (as "lib"is unspecified) Warning in install.packages : package ‘magritte’ is not available (for R version 3.5.3) getwd() [1] "C:/Users/Anjan/OneDrive/Documents"
Upvotes: 2
Views: 4141
Reputation: 6740
It's a bug, reported at https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17842.
R should never put libraries in a user's documents folder. That is an inappropriate use of that folder, and there are better places for this kind of data.
Upvotes: 0
Reputation: 1
Use this to see actual library paths:
.libPaths()
And the same to set another destination folder to install:
.libPaths(PATH_THAT_YOU_WANT)
You can also specify a location like we see here:
Install R package to a specific directory
Take a look into the docs:
https://rdocumentation.org/packages/base/versions/3.6.1/topics/libPaths
Upvotes: 0