aloy / qqplotr

Extending some ggplot2 functionalities by permitting the drawing of both quantile-quantile (Q-Q) and probability-probability (P-P) points, lines, and confidence bands
https://aloy.github.io/qqplotr/
GNU General Public License v3.0
51 stars 8 forks source link

Error message when implementing qqplotr #17

Open JuanDiegoHL opened 6 months ago

JuanDiegoHL commented 6 months ago

Dear Dr. Loy,

I hope you are well.

I recently found on the Internet the package you developed. I am trying to create a Q-Q chart with confidence bands, but when I recreate the example you provide (as it appears in https://cran.r-project.org/web/packages/qqplotr/vignettes/introduction.html), I get this error message:

set.seed(0)

smp <- data.frame(norm = rnorm(100))

gg <- ggplot(data = smp, mapping = aes(sample = norm)) +

  • stat_qq_band() +
  • stat_qq_line() +
  • stat_qq_point() +
  • labs(x = "Theoretical Quantiles", y = "Sample Quantiles")

gg

Error in stat_qq_band(): ! Problem while converting geom to grob. ℹ Error occurred in the 1st layer. Caused by error in fill_alpha(): ! could not find function "fill_alpha" Run rlang::last_trace() to see where the error occurred.

Any help would be greatly appreciated. Thanks in advance.

aloy commented 6 months ago

Hi @JuanDiegoHL, what version of ggplot2 are you running? Have you tried updating it?

JuanDiegoHL commented 6 months ago

Thanks for your reply.

As far as I know, this is the latest version of ggplot2. Here is the sessionInfo() output:

sessionInfo() R version 4.3.1 (2023-06-16 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/New_York tzcode source: internal

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] ggplot2_3.4.3

loaded via a namespace (and not attached): [1] utf8_1.2.3 generics_0.1.3 class_7.3-22 qqconf_1.3.2
[5] robustbase_0.99-0 bitops_1.0-7 lattice_0.21-8 pracma_2.4.4
[9] magrittr_2.0.3 caTools_1.18.2 grid_4.3.1 iterators_1.0.14
[13] mvtnorm_1.2-3 cellranger_1.1.0 foreach_1.5.2 doParallel_1.0.17
[17] Matrix_1.6-1.1 opdisDownsampling_1.0.1 e1071_1.7-13 httr_1.4.7
[21] fansi_1.0.4 scales_1.3.0 DescTools_0.99.54 codetools_0.2-19
[25] cli_3.6.1 rlang_1.1.1 pbmcapply_1.5.1 expm_0.999-9
[29] cowplot_1.1.1 munsell_0.5.1 withr_3.0.0 rootSolve_1.8.2.4
[33] tools_4.3.1 parallel_4.3.1 lmom_3.0 gld_2.6.6
[37] Exact_3.2 dplyr_1.1.3 colorspace_2.1-0 boot_1.3-28.1
[41] vctrs_0.6.3 R6_2.5.1 proxy_0.4-27 lifecycle_1.0.4
[45] MASS_7.3-60 pkgconfig_2.0.3 pillar_1.9.0 gtable_0.3.4
[49] glue_1.6.2 data.table_1.14.8 Rcpp_1.0.11 DEoptimR_1.1-3
[53] tibble_3.2.1 tidyselect_1.2.1 rstudioapi_0.15.0 labeling_0.4.3
[57] qqplotr_0.0.6 compiler_4.3.1 readxl_1.4.3 twosamples_2.0.1

aloy commented 6 months ago

ggplot2 version 3.5.0 was released in February. Can you update and see if that solves the issue? I'm running 3.5.0 and can't replicate the error.

JuanDiegoHL commented 5 months ago

I already did that. It worked. Thanks a lot, Dr. Loy. Best regards.

On Fri, Apr 19, 2024, 09:44 adam loy @.***> wrote:

ggplot2 version 3.5.0 was released in February. Can you update and see if that solves the issue? I'm running 3.5.0 and can't replicate the error.

— Reply to this email directly, view it on GitHub https://github.com/aloy/qqplotr/issues/17#issuecomment-2066622289, or unsubscribe https://github.com/notifications/unsubscribe-auth/BH5ZYVN2EFBDNNE2Q7KDDADY6ENTNAVCNFSM6AAAAABGOF7372VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRWGYZDEMRYHE . You are receiving this because you were mentioned.Message ID: @.***>