[R-pkg-devel] Warning about "serialize/load".

2019-07-14 Thread Rolf Turner



In a package (say "clyde") that I am building I save a number of 
datasets in clyde/data via something like:


save(melvin,file="~//clyde/data/melvin.rda")

When I build "clyde" I now get warnings like unto:


WARNING: Added dependency on R >= 3.5.0 because serialized objects in
serialize/load version 3 cannot be read in older versions of R.
File(s) containing such objects: 'clyde/data/melvin.rda'


If I put the argument "version=2" into my save() call, the warnings go away.

What are the implications of this?

What are the consequences/what is the downside of setting version=2?

What are the consequences/what is the downside of adding the dependency 
on R >= 3.5.0 into my DESCRIPTION file?


Who gets shafted by each of these two possibilities?

Which is recommended?

Grateful for any pearls of wisdom.

cheers,

Rolf Turner

--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Warning about "serialize/load".

2019-07-14 Thread Travers Ching
I think the major change was saving of alt-rep objects efficiently.
Example save(1:1e8, file=...) is very efficient.

I'm not sure if that is all that changed it, but I couldn't find
documentation on the differences.

For maximum compatibility in a package, personally I would use version 2.


On Sun, Jul 14, 2019 at 4:52 PM Rolf Turner  wrote:

>
> In a package (say "clyde") that I am building I save a number of
> datasets in clyde/data via something like:
>
> save(melvin,file="~//clyde/data/melvin.rda")
>
> When I build "clyde" I now get warnings like unto:
>
> > WARNING: Added dependency on R >= 3.5.0 because serialized objects in
> > serialize/load version 3 cannot be read in older versions of R.
> > File(s) containing such objects: 'clyde/data/melvin.rda'
>
> If I put the argument "version=2" into my save() call, the warnings go
> away.
>
> What are the implications of this?
>
> What are the consequences/what is the downside of setting version=2?
>
> What are the consequences/what is the downside of adding the dependency
> on R >= 3.5.0 into my DESCRIPTION file?
>
> Who gets shafted by each of these two possibilities?
>
> Which is recommended?
>
> Grateful for any pearls of wisdom.
>
> cheers,
>
> Rolf Turner
>
> --
> Honorary Research Fellow
> Department of Statistics
> University of Auckland
> Phone: +64-9-373-7599 ext. 88276
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Warning about "serialize/load".

2019-07-14 Thread Duncan Murdoch

On 14/07/2019 7:52 p.m., Rolf Turner wrote:


In a package (say "clyde") that I am building I save a number of
datasets in clyde/data via something like:

save(melvin,file="~//clyde/data/melvin.rda")

When I build "clyde" I now get warnings like unto:


WARNING: Added dependency on R >= 3.5.0 because serialized objects in
serialize/load version 3 cannot be read in older versions of R.
File(s) containing such objects: 'clyde/data/melvin.rda'


If I put the argument "version=2" into my save() call, the warnings go away.

What are the implications of this?

What are the consequences/what is the downside of setting version=2?

What are the consequences/what is the downside of adding the dependency
on R >= 3.5.0 into my DESCRIPTION file?


The main consequence of setting the R version is that nobody using an 
older version could use your package.


I'd suggest this is a good thing, unless you plan to test your package 
with those old versions.  People should be nudged to upgrade. However, 
some people are stuck on old versions, and they really would miss out on 
clyde.


I think Travers pointed out the main consequence of forcing version=2: 
some things that are very compact in the next version might take a lot 
more space in version=2, e.g. x <- 1:100.


Duncan Murdoch



Who gets shafted by each of these two possibilities?

Which is recommended?

Grateful for any pearls of wisdom.

cheers,

Rolf Turner



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Warning about "serialize/load".

2019-07-14 Thread Rolf Turner



On 15/07/19 12:06 PM, Travers Ching wrote:

I think the major change was saving of alt-rep objects efficiently.  
Example save(1:1e8, file=...) is very efficient.


I'm not sure if that is all that changed it, but I couldn't find 
documentation on the differences.


For maximum compatibility in a package, personally I would use version 2.


That's my gut reaction as well.  Thanks for the advice.

cheers,

Rolf




On Sun, Jul 14, 2019 at 4:52 PM Rolf Turner > wrote:



In a package (say "clyde") that I am building I save a number of
datasets in clyde/data via something like:

save(melvin,file="~//clyde/data/melvin.rda")

When I build "clyde" I now get warnings like unto:

 > WARNING: Added dependency on R >= 3.5.0 because serialized objects in
 > serialize/load version 3 cannot be read in older versions of R.
 > File(s) containing such objects: 'clyde/data/melvin.rda'

If I put the argument "version=2" into my save() call, the warnings
go away.

What are the implications of this?

What are the consequences/what is the downside of setting version=2?

What are the consequences/what is the downside of adding the dependency
on R >= 3.5.0 into my DESCRIPTION file?

Who gets shafted by each of these two possibilities?

Which is recommended?

Grateful for any pearls of wisdom.

cheers,

Rolf Turner


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Warning about "serialize/load".

2019-07-14 Thread Dirk Eddelbuettel


On 14 July 2019 at 17:06, Travers Ching wrote:
| For maximum compatibility in a package, personally I would use version 2.

Why are you against the futures and all the new shiny things?  ;-)

Duncan put it well in his follow-up message. We might as well use this as a
nudge towards upgrading to current versions.

But if one really felt that one had to, one could always branch and provide
both old and new rds versions.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Warning about "serialize/load".

2019-07-14 Thread Rolf Turner



On 15/07/19 12:19 PM, Duncan Murdoch wrote:


On 14/07/2019 7:52 p.m., Rolf Turner wrote:


In a package (say "clyde") that I am building I save a number of
datasets in clyde/data via something like:

save(melvin,file="~//clyde/data/melvin.rda")

When I build "clyde" I now get warnings like unto:


WARNING: Added dependency on R >= 3.5.0 because serialized objects in
serialize/load version 3 cannot be read in older versions of R.
File(s) containing such objects: 'clyde/data/melvin.rda'


If I put the argument "version=2" into my save() call, the warnings go 
away.


What are the implications of this?

What are the consequences/what is the downside of setting version=2?

What are the consequences/what is the downside of adding the dependency
on R >= 3.5.0 into my DESCRIPTION file?


The main consequence of setting the R version is that nobody using an 
older version could use your package.


I'd suggest this is a good thing, unless you plan to test your package 
with those old versions.  People should be nudged to upgrade. 


Indeed.  I agree.


However, some people are stuck on old versions, and they really would miss
out on clyde.


And I'd hate that!!! :-)

I think Travers pointed out the main consequence of forcing version=2: 
some things that are very compact in the next version might take a lot 
more space in version=2, e.g. x <- 1:100.


I don't think that space is a major issue.  I managed to tot up the
total size of the data sets, using object.size() and I get 1219824 
bytes, i.e. about one and a quarter megabytes.  I don't think that's a 
worry, so I think I'll stick with version=2.


Thanks Duncan.

cheers,

Rolf

--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Warning about "serialize/load".

2019-07-14 Thread Travers Ching
>  Why are you against the futures and all the new shiny things?  ;-)

Sometimes one does not have control over these things, still using R 3.2 on
some systems!  ;o

On Sun, Jul 14, 2019 at 5:43 PM Dirk Eddelbuettel  wrote:

>
> On 14 July 2019 at 17:06, Travers Ching wrote:
> | For maximum compatibility in a package, personally I would use version 2.
>
> Why are you against the futures and all the new shiny things?  ;-)
>
> Duncan put it well in his follow-up message. We might as well use this as a
> nudge towards upgrading to current versions.
>
> But if one really felt that one had to, one could always branch and provide
> both old and new rds versions.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel