From d78f92829ab5416db7fb51c3156fc7f734239169 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Wed, 6 Nov 2024 11:45:38 -0600 Subject: [PATCH] Only do bit64 check if bit64 installed A couple of packages (including httr2) use a hacky wrapper to avoid taking a dependency on bit64. Part of #208 --- R/num_equal.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/num_equal.R b/R/num_equal.R index 9f9b26f..5b70ed5 100644 --- a/R/num_equal.R +++ b/R/num_equal.R @@ -10,7 +10,7 @@ num_equal <- function(x, y, tolerance = default_tol()) { return(FALSE) } - if (is_int64(x) || is_int64(y)) { + if ((is_int64(x) || is_int64(y)) && is_installed("bit64")) { if (can_int64(x) && can_int64(y)) { x <- bit64::as.integer64(x) y <- bit64::as.integer64(y)