[R] Problem with save/load across R versions and OS

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Wed Jul 17 16:42:13 CEST 2019


On 17/07/2019 4:39 a.m., Sebastien Bihorel wrote:
> Hi,
> 
> I am trying to transfer an S4 object from a machine working with CentOS 7.2 / R 3.4.3 to another one running Linux Mint 19 / R 3.6.0. If I save the object using saveRDS in obj.rds, loadRDS returns an "unknown input format" error on my Linux Mint machine. Interestingly enough, obj.rds loads just fine in a 3rd machine running Windows Server 2012 / R 3.4.3. I tried also using save and load and various values of the ascii and compression arguments, but still no cigar...
> 
> Do you have recommendations on how to successfully transfer my object to my Linux Mint machine?
> 


Normally such a transfer should just work.  Reasons why it might not:

  - The error is being triggered by a contributed package somehow.  Do 
contributed package versions match?

  - There's no loadRDS function in base R, the base R function is 
readRDS.  If that's not just a typo above, then the loadRDS function 
you're using doesn't work.  Use the base package functions instead.

  - There's a bug in R.

In any case, we can't do much to help you without a reproducible example.

Duncan Murdoch



More information about the R-help mailing list