Skip to content
Prev 377367 / 398502 Next

saveRDS() and readRDS() Why? [solved, pretty much anyway)

On 2018-11-12 22:49, peter dalgaard wrote:
It seems to work fine using the same installation to read as used for 
the save.
But it's a different story if the save was done on a Windows 
installation and read on a Linux installation.

## On Windows 3.4.2
Files x.rds and y.rds are identical in size but utterly different in 
content.

## On Linux 3.5.1
Error in readRDS(file = "x.rds") : error reading from connection
Ozone Solar.R Wind Temp Month Day
1    41     190  7.4   67     5   1
2    36     118  8.0   72     5   2
3    12     149 12.6   74     5   3
4    18     313 11.5   62     5   4
5    NA      NA 14.3   56     5   5
6    28      NA 14.9   66     5   6

It might just be the age of the Windows installation.  I don't have much 
use for Windows, so I haven't had much inclination to install a newer 
version.

YMMV