Skip to content

Drop support for R 3.2 #4247

Closed
Closed
@yutannihilation

Description

@yutannihilation

As I commented on #4242 (comment), digest package now requires R >= 3.3. digest::digest() is used for hashing guides so that we can merge overlapped guides by guides_merge().

ggplot2/R/guides-.r

Lines 231 to 244 in 7e51849

# merge overlapped guides
guides_merge <- function(gdefs) {
# split gdefs based on hash, and apply Reduce (guide_merge) to each gdef group.
gdefs <- lapply(gdefs, function(g) {
if (g$order == 0) {
order <- "99"
} else {
order <- sprintf("%02d", g$order)
}
g$hash <- paste(order, g$hash, sep = "_")
g
})
tapply(gdefs, sapply(gdefs, function(g)g$hash), function(gs)Reduce(guide_merge, gs))
}

Since the hashing we need is very simple, it's probably possible to implement another hashing function (Maybe paste() with some nice separator is enough...?), but I'm not sure if it's worth. I feel it's time to consider dropping support for R 3.2. If this sounds good, I'll prepare a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions