Skip to content

Hotfix 3.4.4 #5449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# ggplot2 (development version)
# ggplot2 3.4.4

This hotfix release adapts to a change in r-devel's `base::is.atomic()` and
the upcoming retirement of maptools.

* `fortify()` for sp objects (e.g., `SpatialPolygonsDataFrame`) is now deprecated
and will be removed soon in support of [the upcoming retirement of rproj, rgeos,
Expand Down
6 changes: 3 additions & 3 deletions R/aes-evaluation.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ is_calculated <- function(x, warn = FALSE) {
return(TRUE)
}
# Support of old recursive behaviour
if (is.atomic(x)) {
if (is.null(x) || is.atomic(x)) {
FALSE
} else if (is.symbol(x)) {
res <- is_dotted_var(as.character(x))
Expand Down Expand Up @@ -266,7 +266,7 @@ is_staged <- function(x) {

# Strip dots from expressions
strip_dots <- function(expr, env, strip_pronoun = FALSE) {
if (is.atomic(expr)) {
if (is.null(expr) || is.atomic(expr)) {
expr
} else if (is.name(expr)) {
expr_ch <- as.character(expr)
Expand Down Expand Up @@ -323,7 +323,7 @@ strip_stage <- function(expr) {
make_labels <- function(mapping) {
default_label <- function(aesthetic, mapping) {
# e.g., geom_smooth(aes(colour = "loess")) or aes(y = NULL)
if (is.atomic(mapping)) {
if (is.null(mapping) || is.atomic(mapping)) {
return(aesthetic)
}
mapping <- strip_stage(mapping)
Expand Down
2 changes: 1 addition & 1 deletion R/aes.R
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ aes_ <- function(x, y, ...) {
as_quosure_aes <- function(x) {
if (is.formula(x) && length(x) == 2) {
as_quosure(x)
} else if (is.call(x) || is.name(x) || is.atomic(x)) {
} else if (is.null(x) || is.call(x) || is.name(x) || is.atomic(x)) {
new_aesthetic(x, caller_env)
} else {
cli::cli_abort("Aesthetic must be a one-sided formula, call, name, or constant.")
Expand Down