Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R Keeps Downloading Packages to tmp Directory

I am using R Studio on a 2103 MacBook Pro. I had no problems before downloading and installing packages, but recently all my packages are being downloaded and then fail to install:

trying URL 'http://cran.rstudio.com/bin/macosx/mavericks/contrib/3.1/manipulate_1.0.1.tgz' 
Content type 'application/x-gzip' length 33770 bytes (32 Kb) 
opened URL
==================================================
downloaded 32 Kb

The downloaded binary packages are in
/var/folders/yl/7q0_4h3j60d5pp52vmz0b06r0000gn/T//Rtmpa4oYSr/downloaded_packages

.libPath() returns the correct location of my R libraries (not this)

I can install manually from the downloaded package, but this extra step is Very Annoying, and I would like to restore the correct behavior.

Someone seems to have had the same problem here. The solution was to add more swap space. This does not seem to be my issue as ample swap and RAM appear to be available on my machine.

Has anyone had and resolved this issue?

like image 759
cburghard Avatar asked Feb 04 '15 03:02

cburghard


People also ask

How do I set where to install packages in R?

R uses a single package library for each installed version of R on your machine. Fortunately it is easy to modify the path where R installs your packages. To do this, you simply call the function . libPaths() and specify the library location.

Where does R install packages by default?

R packages are installed in a directory called library. The R function . libPaths() can be used to get the path to the library.

How do I stop a package from installing in R?

packages()[, "Package"]) { stop("Package Deriv not installed successfully.") }

Where does R keep its packages?

R packages are a collection of R functions, complied code and sample data. They are stored under a directory called "library" in the R environment. By default, R installs a set of packages during installation.


1 Answers

Posting the Answer from the user so as not to lose info:

When you download r Packages,R shows the temp path where the files are downloaded like below...

The downloaded binary packages are in /var/folders/yl/7q0_4h3j60d5pp52vmz0b06r0000gn/T//Rtmpa4oYSr/downloaded_packages

But R deletes these files in Temp folders and install them in .libpath() path once the installation is done..

like image 138
TheGameiswar Avatar answered Oct 06 '22 02:10

TheGameiswar