Skip to content

Commit d38f116

Browse files
authored
Hotfix 3.4.4 (#5449)
* is.atomic() --> is.atomic() || is.null() * Polish news * Put is.null() first
1 parent 964a2b9 commit d38f116

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

NEWS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# ggplot2 (development version)
1+
# ggplot2 3.4.4
2+
3+
This hotfix release adapts to a change in r-devel's `base::is.atomic()` and
4+
the upcoming retirement of maptools.
25

36
* `fortify()` for sp objects (e.g., `SpatialPolygonsDataFrame`) is now deprecated
47
and will be removed soon in support of [the upcoming retirement of rproj, rgeos,

R/aes-evaluation.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ is_calculated <- function(x, warn = FALSE) {
226226
return(TRUE)
227227
}
228228
# Support of old recursive behaviour
229-
if (is.atomic(x)) {
229+
if (is.null(x) || is.atomic(x)) {
230230
FALSE
231231
} else if (is.symbol(x)) {
232232
res <- is_dotted_var(as.character(x))
@@ -266,7 +266,7 @@ is_staged <- function(x) {
266266

267267
# Strip dots from expressions
268268
strip_dots <- function(expr, env, strip_pronoun = FALSE) {
269-
if (is.atomic(expr)) {
269+
if (is.null(expr) || is.atomic(expr)) {
270270
expr
271271
} else if (is.name(expr)) {
272272
expr_ch <- as.character(expr)
@@ -323,7 +323,7 @@ strip_stage <- function(expr) {
323323
make_labels <- function(mapping) {
324324
default_label <- function(aesthetic, mapping) {
325325
# e.g., geom_smooth(aes(colour = "loess")) or aes(y = NULL)
326-
if (is.atomic(mapping)) {
326+
if (is.null(mapping) || is.atomic(mapping)) {
327327
return(aesthetic)
328328
}
329329
mapping <- strip_stage(mapping)

R/aes.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ aes_ <- function(x, y, ...) {
280280
as_quosure_aes <- function(x) {
281281
if (is.formula(x) && length(x) == 2) {
282282
as_quosure(x)
283-
} else if (is.call(x) || is.name(x) || is.atomic(x)) {
283+
} else if (is.null(x) || is.call(x) || is.name(x) || is.atomic(x)) {
284284
new_aesthetic(x, caller_env)
285285
} else {
286286
cli::cli_abort("Aesthetic must be a one-sided formula, call, name, or constant.")

0 commit comments

Comments
 (0)