From e069e48e36f4e55d37002a1284a739e19a4c45fe Mon Sep 17 00:00:00 2001 From: Benjamin Schwendinger Date: Sun, 18 Oct 2026 10:59:46 +0200 Subject: [PATCH] use is.numeric for linter --- R/setops.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/setops.R b/R/setops.R index 4ae78b193d..3fa49e89c2 100644 --- a/R/setops.R +++ b/R/setops.R @@ -17,7 +17,7 @@ setdiff_ = function(x, y, by.x=seq_along(x), by.y=seq_along(y), use.names=FALSE) stopf("When x's column ('%s') is character, the corresponding column in y ('%s') should be factor or character, but found incompatible type '%s'.", xcnam, icnam, typeof(y[[lc]]), class="dt_join_type_mismatch_error") } else if ( is.factor(x[[rc]]) && !(is.character(y[[lc]]) || is.factor(y[[lc]])) ) { stopf("When x's column ('%s') is factor, the corresponding column in y ('%s') should be character or factor, but found incompatible type '%s'.", xcnam, icnam, typeof(y[[lc]]), class="dt_join_type_mismatch_error") - } else if ( (is.integer(x[[rc]]) || is.double(x[[rc]])) && (is.logical(y[[lc]]) || is.character(y[[lc]])) ) { + } else if ( is.numeric(x[[rc]]) && (is.logical(y[[lc]]) || is.character(y[[lc]])) ) { stopf("When x's column ('%s') is integer or numeric, the corresponding column in y ('%s') can not be character or logical types, but found incompatible type '%s'.", xcnam, icnam, typeof(y[[lc]]), class="dt_join_type_mismatch_error") } }