Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message when implementing qqplotr #17

Open
JuanDiegoHL opened this issue Apr 18, 2024 · 4 comments
Open

Error message when implementing qqplotr #17

JuanDiegoHL opened this issue Apr 18, 2024 · 4 comments

Comments

@JuanDiegoHL
Copy link

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
Copy link
Owner

aloy commented Apr 19, 2024

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

@JuanDiegoHL
Copy link
Author

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
Copy link
Owner

aloy commented Apr 19, 2024

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
Copy link
Author

JuanDiegoHL commented Apr 22, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants