Re: [R] saveRDS() and readRDS() Why? [solved, pretty much anyway)

2018-11-13 Thread William Dunlap via R-help
Perhaps you got bitten by Dolphin's non-modal dialogs, as described in https://userbase.kde.org/Dolphin/File_Management: Non Modal Dialogs When Moving, Copying or Deleting files/directories the dialog disappears even when the operation has not yet completed. A progress bar then appears in the

Re: [R] saveRDS() and readRDS() Why? [solved, pretty much anyway)

2018-11-13 Thread p_connolly
This is getting more strange. I normally copy from the shared folder to the appropriate directory using Dolphin, the KDE file manager. If instead I use the standard bash cp command, no corruption happens -- at least with the limited testing I have done. There also seems to be no problem

Re: [R] saveRDS() and readRDS() Why? [solved, pretty much anyway)

2018-11-13 Thread William Dunlap via R-help
It seems like copying the files corrupted them. How did you copy them (with R or cp or copy or ftp, etc.)? I don't see how this has anything to do with R. Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Nov 12, 2018 at 7:10 PM, p_connolly wrote: > On 2018-11-13 12:55, William Dunlap

Re: [R] saveRDS() and readRDS() Why? [solved, pretty much anyway)

2018-11-12 Thread p_connolly
On 2018-11-13 12:55, William Dunlap wrote: You wrote: ## On Windows 3.4.2 x <- airquality saveRDS(x, file = "x.rds") saveRDS(x, file = "y.rds") Files x.rds and y.rds are identical in size but utterly different in content. Wow! Can you show us the results of x <- datasets::airquality

Re: [R] saveRDS() and readRDS() Why? [solved, pretty much anyway)

2018-11-12 Thread William Dunlap via R-help
You wrote: ## On Windows 3.4.2 > x <- airquality > saveRDS(x, file = "x.rds") > saveRDS(x, file = "y.rds") > Files x.rds and y.rds are identical in size but utterly different in content. Wow! Can you show us the results of x <- datasets::airquality saveRDS(x, file="x.rds")

Re: [R] saveRDS() and readRDS() Why? [solved, pretty much anyway)

2018-11-12 Thread p_connolly
On 2018-11-12 22:49, peter dalgaard wrote: Er, where, what, how? I can't reproduce that, at least not on 3.5.1 on MacOS: x <- airquality saveRDS(x, file = "x.rds") x <- NULL x <- readRDS(file = "x.rds") x Ozone Solar.R Wind Temp Month Day 1 41 190 7.4 67 5 1 2 36

Re: [R] saveRDS() and readRDS() Why? [solved, pretty much anyway)

2018-11-12 Thread Patrick Connolly
The solution was very simple. Don't use the same name for the rds file as used for the R object, viz a vie: saveRDS(x, file = "x.rds") and x <- readRDS(file = "x.rds") will not work; however saveRDS(x, file = "y.rds") and x <- readRDS(file = "y.rds") will work. An undocumented feature?