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
Currently, the layer() function does not initialize all parameters for the associated Geom or Stat. This can lead to issues when multiple parameters share a common prefix. A typical example is StatSummary, which includes parameters like fun, fun.data, fun.max, and fun.min. If a Stat is invoked within a geom_* function using the stat argument, problems can arise in StatSummary$setup_params where params$fun may be incorrectly matched to fun.data, fun.max, or fun.min due to R's partial matching behavior.
Please see the warning message.
options(warnPartialMatchDollar=TRUE)
df<-data.frame(
x= c(1, 1, 2, 2, 1, 1, 2, 2),
y= c(1, 2, 2, 3, 2, 3, 1, 2),
fill= c(rep("A", 4), rep("B", 4))
)
library(ggplot2)
# I won't draw anything, please see the warning messagep<- ggplot(df, aes(x, y, color=fill, fill=fill)) +
geom_smooth(stat="summary", fun.data=mean_se)
pdf()
print(p)
#> Warning in params$fun: partial match of 'fun' to 'fun.data'
dev.off()
#> png #> 2
Currently, the
layer()
function does not initialize all parameters for the associatedGeom
orStat
. This can lead to issues when multiple parameters share a common prefix. A typical example isStatSummary
, which includes parameters likefun
,fun.data
,fun.max
, andfun.min
. If aStat
is invoked within ageom_*
function using thestat
argument, problems can arise inStatSummary$setup_params
whereparams$fun
may be incorrectly matched to fun.data, fun.max, or fun.min due to R's partial matching behavior.Please see the warning message.
Created on 2025-04-09 with reprex v2.1.0
Session info
The text was updated successfully, but these errors were encountered: