readRDS(file) in R

These are suggestions I have come across: Delete your .Rhistory and .RData files in the directory in which you are running R. Run update.packages() Try and detect “bad files” in your library directories. You can do this in R # List the library paths # The issue is likely to be in the first directory … Read more

Windows 7, update.packages problem: “unable to move temporary installation”?

I found that the problem indeed is the antivirus “real time file system protection”. I do the following to fix the problem: trace(utils:::unpackPkgZip, edit=TRUE) I edit line 140 (line 142 in R 3.4.4): Sys.sleep(0.5) to: Sys.sleep(2) I seems like the antivirus stalls the creation of the package tmp dir. After changing it to 2 seconds … Read more

How to install Python packages from the tar.gz file without using pip install

You may use pip for that without using the network. See in the docs (search for “Install a particular source archive file”). Any of those should work: pip install relative_path_to_seaborn.tar.gz pip install absolute_path_to_seaborn.tar.gz pip install file:///absolute_path_to_seaborn.tar.gz Or you may uncompress the archive and use setup.py directly with either pip or python: cd directory_containing_tar.gz tar -xvzf … Read more

Where does R store packages?

The install.packages command looks through the .libPaths variable. Here’s what mine defaults to on OSX: > .libPaths() [1] “/Library/Frameworks/R.framework/Resources/library” I don’t install packages there by default, I prefer to have them installed in my home directory. In my .Rprofile, I have this line: .libPaths( “/Users/tex/lib/R” ) This adds the directory “/Users/tex/lib/R” to the front of … Read more

Painless way to install a new version of R?

Just for completeness, there are some ways to prevent you from having this problem. As Dirk said, save your packages in another directory on your computer. install.packages(“thepackage”,lib=”/path/to/directory/with/libraries”) You can change the default .Library value using the function .libPaths too .libPaths(“/path/to/directory/with/libraries”) This will put this path as a first value in the .Library variable, and will … Read more