vctrs bug is preventing calculation/plotting of ggdist geoms.
library(distributional)
library(ggidst)
Repro example:
df <- data.frame(
name = c("Normal(0,1)"),
distr = c(dist_normal(0,1)))
colnames(df) <- c("name", "distr")
ggplot(df, aes(y = factor(name))) +
stat_halfeye(aes(dist = distr)) +
labs(y = NULL, x = NULL)
Error in `layer_slabinterval()`:
! Problem while computing aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error in `list_sizes()`:
! Corrupt data frame: row.names are missing
ℹ In file size.c at line 177.
ℹ Install the winch package to get additional debugging info the next time you get this error.
ℹ This is an internal error that was detected in the vctrs package.
Please report it at <https://github.com/r-lib/vctrs/issues> with a reprex and the full backtrace.
Backtrace:
▆
1. ├─base (local) `<fn>`(x)
2. ├─ggplot2 (local) `print.ggplot2::ggplot`(x)
3. │ ├─ggplot2::ggplot_build(x)
4. │ └─ggplot2 (local) `ggplot_build.ggplot2::ggplot`(x)
5. │ └─ggplot2:::by_layer(...)
6. │ ├─rlang::try_fetch(...)
7. │ │ ├─base::tryCatch(...)
8. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
9. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
10. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
11. │ │ └─base::withCallingHandlers(...)
12. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
13. │ └─l$compute_aesthetics(d, plot)
14. │ └─ggdist (local) compute_aesthetics(..., self = self)
15. │ └─ggproto_parent(l, self)$compute_aesthetics(data, plot)
16. │ └─ggplot2 (local) compute_aesthetics(..., self = self)
17. │ └─vctrs::list_sizes(evaled)
18. └─rlang:::stop_internal_c_lib(...)
19. └─rlang::abort(message, call = call, .internal = TRUE, .frame = frame)
> sessionInfo()
R version 4.4.0 (2024-04-24)
Platform: aarch64-apple-darwin20
Running under: macOS 15.7.4
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: Europe/London
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] distributional_0.5.0 bamlss_1.2-5 mgcv_1.9-4 nlme_3.1-168
[5] distributions3_0.2.3 colorspace_2.1-2 coda_0.19-4.1 tidybayes_3.0.7
[9] glmmTMB_1.1.13 performance_0.15.3 marginaleffects_0.31.0 parameters_0.28.3
[13] lubridate_1.9.4 forcats_1.0.1 stringr_1.6.0 dplyr_1.1.4
[17] purrr_1.2.0 readr_2.1.6 tidyr_1.3.1 tibble_3.3.0
[21] ggplot2_4.0.1 tidyverse_2.0.0
loaded via a namespace (and not attached):
[1] tidyselect_1.2.1 svUnit_1.0.8 farver_2.1.2 S7_0.2.1 TH.data_1.1-5
[6] tensorA_0.36.2.1 bayestestR_0.17.0 timechange_0.3.0 estimability_1.5.1 lifecycle_1.0.4
[11] survival_3.8-3 processx_3.8.6 magrittr_2.0.4 posterior_1.6.1 compiler_4.4.0
[16] rlang_1.1.6 tools_4.4.0 data.table_1.17.8 knitr_1.50 labeling_0.4.3
[21] bit_4.6.0 sp_2.2-0 RColorBrewer_1.1-3 pkgload_1.4.1 multcomp_1.4-29
[26] abind_1.4-8 withr_3.0.2 numDeriv_2016.8-1.1 grid_4.4.0 datawizard_1.3.0
[31] xtable_1.8-4 emmeans_2.0.0 scales_1.4.0 MASS_7.3-65 dichromat_2.0-0.1
[36] insight_1.4.4 cli_3.6.5 mvtnorm_1.3-3 crayon_1.5.3 reformulas_0.4.2
[41] generics_0.1.4 MBA_0.1-2 rstudioapi_0.17.1 tzdb_0.5.0 minqa_1.2.8
[46] splines_4.4.0 parallel_4.4.0 vctrs_0.6.5 boot_1.3-32 Matrix_1.7-4
[51] sandwich_3.1-1 callr_3.7.6 hms_1.1.4 arrayhelpers_1.1-0 bit64_4.6.0-1
[56] Formula_1.2-5 ggdist_3.3.3 pak_0.9.1 glue_1.8.0 nloptr_2.2.1
[61] codetools_0.2-20 ps_1.9.1 stringi_1.8.7 gtable_0.3.6 lme4_1.1-38
[66] pillar_1.11.1 R6_2.6.1 TMB_1.9.18 Rdpack_2.6.4 vroom_1.6.7
[71] evaluate_1.0.5 lattice_0.22-7 rbibutils_2.4 backports_1.5.0 Rcpp_1.1.0
[76] checkmate_2.3.3 xfun_0.54 zoo_1.8-14 pkgconfig_2.0.3
vctrs bug is preventing calculation/plotting of ggdist geoms.