-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
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()
.
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
Labels
No labels