Skip to content

Commit

Permalink
workaround rep() non-dispatch on ancient R (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico authored Oct 22, 2024
1 parent a230fb2 commit 1f1ff56
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/integer64.R
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,12 @@ all.equal.integer64 <- function (
keep <- which(!out)
target <- target [keep]
current <- current[keep]
if(!is.null(scale) && length(scale) > 1L)
scale <- rep_len(scale, length(out))[keep]
if(!is.null(scale) && length(scale) > 1L) {
# TODO(R>=4.0.0): Try removing this ocl part when rep() dispatching WAI on all versions (#100)
ocl = class(scale)
scale = rep_len(scale, length(out))[keep]
class(scale) = ocl
}
}
N <- length(target)
what <- if (is.null(scale)) {
Expand Down

0 comments on commit 1f1ff56

Please sign in to comment.