You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a problem with... scale_y_continuous() (and by extension scale_x_continuous()) not working when called inside a function executed by do.call().
I expected... the execution location to not have effect on the method.
Here is the code to reproduce the bug:
library(ggplot2)
plot_fn<-function(data=iris, mapping= aes(Sepal.Length, Sepal.Width)) {
ggplot(data, mapping) + geom_point() + scale_y_continuous()
}
do.call(plot_fn, list())
#> Error in as.character(call[[1]]): cannot coerce type 'closure' to vector of type 'character'
Work around: Use rlang::inject(plot_fn(!!!args)); (... But I should not be required to do this)
The text was updated successfully, but these errors were encountered:
schloerke
changed the title
scale_*_continuous() functions do not work inside do.call()scale_{x,y}_continuous() functions do not work inside do.call()Feb 9, 2024
I found a problem with...
scale_y_continuous()
(and by extensionscale_x_continuous()
) not working when called inside a function executed bydo.call()
.I expected... the execution location to not have effect on the method.
Here is the code to reproduce the bug:
Created on 2024-02-09 with reprex v2.0.2
Related: #5443, #5436
cc @teunbrand
Work around: Use
rlang::inject(plot_fn(!!!args))
; (... But I should not be required to do this)The text was updated successfully, but these errors were encountered: