What is the best way to determine the version of an `.rds`?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What is the best way to determine the version of an `.rds`?

Jennifer Bryan
Hi,

I am writing a test that consults the serialization version of an `.rds`
file.

An attractive way to get this is:

tools:::get_serialization_version() # reports just version

which calls

.Internal(serializeInfoFromConn() # reports much more

but neither is truly exported for public use.

Is there an official, exported way to get the serialization version? It is
possible to get this information with R code yourself, but it doesn't feel
very elegant.

If not, could we have this? It's pretty easy these days to acquire a
version 3 file, without real intent, which risks making the package require
R >= 3.5.

Thanks,
Jenny

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: [External] What is the best way to determine the version of an `.rds`?

Tierney, Luke
Can you add a wishlist item to bugzilla?

Thanks,

luke

On Mon, 15 Jul 2019, Jennifer Bryan wrote:

> Hi,
>
> I am writing a test that consults the serialization version of an `.rds`
> file.
>
> An attractive way to get this is:
>
> tools:::get_serialization_version() # reports just version
>
> which calls
>
> .Internal(serializeInfoFromConn() # reports much more
>
> but neither is truly exported for public use.
>
> Is there an official, exported way to get the serialization version? It is
> possible to get this information with R code yourself, but it doesn't feel
> very elegant.
>
> If not, could we have this? It's pretty easy these days to acquire a
> version 3 file, without real intent, which risks making the package require
> R >= 3.5.
>
> Thanks,
> Jenny
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

--
Luke Tierney
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:   [hidden email]
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: What is the best way to determine the version of an `.rds`?

Tomas Kalibera
In reply to this post by Jennifer Bryan
Now infoRDS() reports all the meta-data from
.Internal(serializeInfoFromConn()).

Best
Tomas

On 7/15/19 12:01 PM, Jennifer Bryan wrote:

> Hi,
>
> I am writing a test that consults the serialization version of an `.rds`
> file.
>
> An attractive way to get this is:
>
> tools:::get_serialization_version() # reports just version
>
> which calls
>
> .Internal(serializeInfoFromConn() # reports much more
>
> but neither is truly exported for public use.
>
> Is there an official, exported way to get the serialization version? It is
> possible to get this information with R code yourself, but it doesn't feel
> very elegant.
>
> If not, could we have this? It's pretty easy these days to acquire a
> version 3 file, without real intent, which risks making the package require
> R >= 3.5.
>
> Thanks,
> Jenny
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel