Skip to content

Bump R dependency to R 3.2.0 ? #4048

@mattdowle

Description

@mattdowle

What do people think?

R 3.2.0 was April 2015. Current dependency is R 3.1.0 (April 2014). I have quite a low resistance to moving it up as long as we support over 3 years old. And we would still be supporting 4.5 year old R.

The motivation is that PR #3802 doesn't pass on R 3.1.0 (thanks to GLCI letting us know already) due to this difference :

# R 3.1.0
> jsub = quote(list(A=mean(x), B=y+2))
> names(jsub)
[1] ""  "A" "B"
> names(jsub) = NULL
> names(jsub)
[1] ""  "A" "B"

# R >= 3.2.0 
> jsub = quote(list(A=mean(x), B=y+2))
> names(jsub)
[1] ""  "A" "B"
> names(jsub) = NULL
> names(jsub)
NULL

Thanks to this new feature in R 3.2.0:

  • names(x) <- NULL now clears the names of call and ... objects.

That nice change was at C level in src/main/attrib.c:removeAttrib() here: wch/r-source@3d5a3b0#diff-606a8f9047f5c8e5856a59f32e1e997f

R 3.1.0 could be supported using the same copy as was done before the PR. The copy is of an expression so it's not the speed or memory that concerns me, just the extra/inelegant code (it wasn't just a copy but a conversion of jsub though as.list.default, and then a construction of the call again afterwards using call()). I haven't looked too hard at a possible workaround yet. It took me a while to debug it, and I've just got to this stage, so I thought I'd first float the idea of bumping the dependency to R 3.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions