Zach Zach - 1 month ago 10
R Question

readRDS(file) in R

Whenever I try to install a package in R, I get the following error:

Error in readRDS(file) : unknown input format


This just started occurring after I had a system crash. I am running 32 bit R 2.13.0 under windows 7. I tried removing and re-installing R, but continue to get the error. Is there any way I can fix this without deleting everything (i.e. all the packages I've installed) and starting over?

Thanks

Answer

The three suggestions I have come across are:

  1. Delete your .Rhistory and .RData files in the directory in which you are running R.
  2. Run update.packages()
  3. Delete the directory in which you have stored your downloaded packages.

Only solution 3 worked for me.

Ref: R-sig-Debian mailing list