[R] Problem with save/load across R versions and OS
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Wed Jul 17 21:04:46 CEST 2019
On 17/07/2019 2:02 p.m., Sebastien Bihorel wrote:
> Hi,
>
> Indeed the S4 object is a class provided by a contributed package. However, the windows machine that reads the .rds fine does not even have the package installed.
>
> I also confirm that I used readRDS (loadRDS was a typo on my part, sorry).
>
> In this case, I cannot provide a reprex as the contributed package function that creates the S4 object connects to a local database with secured access. I could send the code, but only the authorized people could run it. This is not the ideal situation for problem solving...
>
> I was wondering if there was a pathway through serialize / unserialize. I tried but I could not find the way to properly write and read the serialized object.
I don't know about that approach.
You can probably produce a reprex, it'll just be work: copy the
function from the contributed package, and edit it so that the line that
reads from the database just generates some fake data in a similar
format. If you can make it reproducible, then cut out as much stuff as
possible, keeping it reproducible, and post the final minimal reprex.
It's likely to take some time, but also likely to lead to a solution
(either by you, when you notice a bug in the contributed package and can
fix it, or by one of us, when you post the reprex and we dig in).
Duncan Murdoch
More information about the R-help
mailing list