Closed wbvguo closed 6 months ago
@wbvguo Hi Wenbin, the error comes from the computation of the $R^2$ confidence interval. One can disable this computation by adding rsquared.conf.level = NA
as shown below. This is anyway a bug that I need to fix, as this error should be handled more gracefully. Please, leave this issue open. Thanks for the report!
test_df %>%
ggplot(aes(x = ref1, y = ref2, colour = grp)) +
geom_point() +
geom_smooth(method="lm" , color="black", fill='grey', se=TRUE, alpha = 0.5, linewidth =0.5) +
stat_poly_eq(use_label("eq"), label.x.npc = 0.055, label.y.npc = 0.88, color = "black",
coef.keep.zeros = FALSE, rsquared.conf.level = NA) +
geom_abline(intercept = 0, slope = 1, linetype = "dashed", color = "blue", alpha =0.5) +
theme_bw() +
facet_wrap(~grp)
Thanks @aphalo, this is helpful!
Fixed now, using a call to try()
.
Hi,
thanks for maintaining this package, I found the
stat_poly_eq()
might not show equations in some cases with warning message:Here is the code example with test data
Here the panel E's equation is missing. Do you have any idea why this happen, and perhaps any suggestions to make it work?
Thanks!