Skip to content
Browse files

Fix bug in aesthetics shown by GeomCustomAnn

When a default was -Inf, it would come across as a language
object, not a numeric object. This caused problems as a
component of a list as a column of a data.frame. Running eval
on each element removes the call and makes -Inf numeric.
  • Loading branch information...
1 parent 4dacb6a commit 18bac818c887c4185bbfd37f102c582b976b6a78 @BrianDiggs committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 R/utilities-help.r
View
2 R/utilities-help.r
@@ -16,7 +16,7 @@ aesthetics <- function(x) {
stringsAsFactors = FALSE)
allowed_aes$required <- rep(FALSE, nrow(allowed_aes))
allowed_aes$required[allowed_aes$aesthetic %in% req_aes] <- TRUE
- allowed_aes$default <- def_aes[allowed_aes$aesthetic]
+ allowed_aes$default <- lapply(def_aes, eval)[allowed_aes$aesthetic]
allowed_aes[order(!allowed_aes$required, allowed_aes$aesthetic),]
}

0 comments on commit 18bac81

Please sign in to comment.
Something went wrong with that request. Please try again.