[R] Error in readRDS(dest) (was Re: Error with installed.packages with R 3.4.0 on Windows)

Patrick Connolly p_connolly at slingshot.co.nz
Wed May 24 11:07:59 CEST 2017

On Tue, 23-May-2017 at 12:20PM +0200, Martin Maechler wrote:


|> Given the above stack trace. 
|> It may be easier to just do
|>     debugonce(available.packages)
|>     install.packages("withr")
|> and then inside available.packages, (using 'n') step to the
|> point _before_ the tryCatch(...) call happens; there, e.g. use
|>       ls.str()

I got:

contriburl :  chr [1:2] "http://cran.stat.auckland.ac.nz/src/contrib" ...
dest :  chr "/tmp/Rtmp6D0KNY/repos_http%3A%2F%2Fcran.stat.auckland.ac.nz%2Fsrc%2Fcontrib.rds"
fields :  chr [1:16] "Package" "Version" "Priority" "Depends" "Imports" "LinkingTo" ...
filters :  NULL
localcran :  logi FALSE
method : <missing>
repos :  chr "http://cran.stat.auckland.ac.nz/src/contrib"
requiredFields :  chr [1:16] "Package" "Version" "Priority" "Depends" "Imports" "LinkingTo" ...
res :  chr[0 , 1:17] 
type :  chr "source"

So I thought the missing method was the problem.  However, it's
exactly the same with R-3.3.3.  So still no answwer.

Then I tried:


Browse[2]> con
A connection with    
description "/tmp/RtmpqzKzzK/repos_http%3A%2F%2Fcran.stat.auckland.ac.nz%2Fsrc%2Fcontrib.rds"
class       "gzfile"               
mode        "rb"                   
text        "binary"               
opened      "opened"               
can read    "yes"                  
can write   "no"

## With R-3.3.3

Browse[2]> con       
                                                   can read 
                                                  can write 

So, in 3.4.0, con refers to a repo and is zero length whereas 3.3.3
refers to a library.  To me that would appear to be a major
difference.  That must have something to do with it.  But what?

Since the latter works and the former doesn't, it seems as though the
problem is with 3.4.0's readRDS().  But others seem not to have the
same problem.  I'm no closer to understanding what's happenning.

   ___    Patrick Connolly   
 {~._.~}                   Great minds discuss ideas    
 _( Y )_  	         Average minds discuss events 
(:_~*~_:)                  Small minds discuss people  
 (_)-(_)  	                      ..... Eleanor Roosevelt

More information about the R-help mailing list