Skip to content

Commit c8cf28c

Browse files
authored
[r] Future-proof one assertion for an upcoming change in R 4.4.0 (#1914)
1 parent 75d1a91 commit c8cf28c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apis/r/R/utils-assertions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ check_package <- function(package, version = NULL, quietly = FALSE) {
9393
#' informative error is thrown with the missing values.
9494
#' @noRd
9595
assert_subset <- function(x, y, type = "value") {
96-
stopifnot(is.atomic(x) && is.atomic(y))
96+
stopifnot((is.atomic(x) || is.null(x)) && (is.atomic(y) || is.null(y)))
9797
missing <- !x %in% y
9898
if (any(missing)) {
9999
stop(sprintf(

0 commit comments

Comments
 (0)