microbenchmark
microbenchmark copied to clipboard
ggplot2 4.0.0 now croaks
Updating a document with a call to autoplot now gets us
Warning: `aes_string()` was deprecated in ggplot2 3.0.0.
ℹ Please use tidy evaluation idioms with `aes()`.
ℹ See also `vignette("ggplot2-in-packages")` for more information.
ℹ The deprecated feature was likely used in the microbenchmark package.
Please report the issue at <https://github.com/joshuaulrich/microbenchmark/issues/>.
The following suppresses the croaking. I am not sure if there are other side effects as I know very little about 'tidy evaluation idioms'.
edd@paul:/tmp/r/microbenchmark(master)$ git diff
diff --git i/R/autoplot.R w/R/autoplot.R
index 8c3c5fc..facecd1 100644
--- i/R/autoplot.R
+++ w/R/autoplot.R
@@ -46,7 +46,7 @@ autoplot.microbenchmark <- function(object, ...,
new_order <- do.call("order", c(s[, order, drop=FALSE], decreasing=TRUE))
object$expr <- factor(object$expr, levels = levels(object$expr)[new_order])
}
- plt <- ggplot2::ggplot(object, ggplot2::aes_string(x="expr", y="ntime"))
+ plt <- ggplot2::ggplot(object, ggplot2::aes(x=expr, y=ntime))
plt <- plt + ggplot2::stat_ydensity()
plt <- plt + ggplot2::scale_x_discrete(name="")
edd@paul:/tmp/r/microbenchmark(master)$