corybrunson / ggalluvial

ggplot2 extension for alluvial plots
http://corybrunson.github.io/ggalluvial/
GNU General Public License v3.0
497 stars 34 forks source link

Could not find function default_missing #111

Closed cwibrand closed 1 year ago

cwibrand commented 1 year ago

Hi!

I'm trying to get ggalluvial to work and remaking the vaccinations plot from the vignette. However, I'm getting the following error message. Any ideas of what might be wrong? I'm stumped...

ggplot(vaccinations,

  • aes(x = survey, stratum = response, alluvium = subject,
  • y = freq,
  • fill = response, label = response)) +
  • scale_x_discrete(expand = c(.1, .1)) +
  • geom_flow() +
  • geom_stratum(alpha = .5) +
  • geom_text(stat = "stratum", size = 3) +
  • theme(legend.position = "none") +
  • ggtitle("vaccination survey responses at three points in time") Warning messages: 1: Computation failed in stat_flow() Caused by error in summarise(): ℹ In argument: lode = (function (x, order_by = NULL, default = default_missing(x)) .... ℹ In group 1: alluvium = 1, x = 1, yneg = FALSE, stratum = Missing, deposit = 1, fissure = 1, link = 1, flow = from, adj_deposit = 1.1.5, adj_fissure = 1.1.1. Caused by error in default_missing(): ! could not find function "default_missing" 2: Computation failed in stat_stratum() Caused by error in default_missing(): ! could not find function "default_missing" 3: Computation failed in stat_stratum() Caused by error in default_missing(): ! could not find function "default_missing"

sessionInfo() R version 4.2.2 Patched (2022-11-10 r83330) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.6 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale: [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8
[6] LC_MESSAGES=C.UTF-8 LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C

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

other attached packages: [1] tidyselect_1.2.0 rlang_1.0.6 lazyeval_0.2.2 ggalluvial_0.12.4 ggplot2_3.4.1

loaded via a namespace (and not attached): [1] rstudioapi_0.14 magrittr_2.0.3 munsell_0.5.0 cowplot_1.1.1 colorspace_2.1-0 R6_2.5.1 fansi_1.0.4
[8] dplyr_1.1.0 patchwork_1.1.2 tools_4.2.2 grid_4.2.2 gtable_0.3.1 utf8_1.2.3 cli_3.6.0
[15] withr_2.5.0 tibble_3.1.8 lifecycle_1.0.3 purrr_1.0.1 tidyr_1.3.0 vctrs_0.5.2 glue_1.6.2
[22] compiler_4.2.2 pillar_1.8.1 generics_0.1.3 scales_1.2.1 pkgconfig_2.0.3

corybrunson commented 1 year ago

Hi @cwibrand, this issue should be resolved soon; i'm in the process of sending a patch to CRAN. See #107 and #108 for details.

corybrunson commented 1 year ago

I'll close this issue as 0.12.5 is on CRAN and the other two issues document the problem and my understanding of it, but please do reopen if you install 0.12.5 and encounter the same or a related problem!