One of the main "significant user-visible changes" for the upcoming R release, v4.4, is that:
is.atomic(NULL) now returns FALSE, as NULL is not an atomic vector. Strict back compatibility would replace is.atomic(foo) by (is.null(foo) || is.atomic(foo)) but should happen sparingly only.
expr_label(NULL) under R <4.4 would return "NULL"
expr_label(NULL) under R 4.4 would return "`NULL`"
Although expr_label() is already under lifecycle label questioning, this may have minor unintended consequences
expr_label <- function(expr) {
if (is.character(expr)) {
encodeString(expr, quote = '"')
} else if (is.atomic(expr)) { # should this be replaced with (is.null(expr) || is.atomic(expr)) ?
format(expr)
} else if (is.name(expr)) {
paste0("`", as.character(expr), "`")
} else {
chr <- deparse_one(expr)
paste0("`", chr, "`")
}
}
One of the main "significant user-visible changes" for the upcoming R release, v4.4, is that:
is.atomic(NULL)
now returnsFALSE
, asNULL
is not an atomic vector. Strict back compatibility would replaceis.atomic(foo)
by(is.null(foo) || is.atomic(foo))
but should happen sparingly only.expr_label(NULL)
under R <4.4 would return "NULL"expr_label(NULL)
under R 4.4 would return "`NULL`"Although
expr_label()
is already under lifecycle label questioning, this may have minor unintended consequences