jmw86069 / venndir

Venn diagrams with directionality (concordance), optional display of items inside the figure, text Venn diagrams
https://jmw86069.github.io/venndir
Other
6 stars 0 forks source link

meet error 'length = 2' in coercion to 'logical(1)' #8

Closed LynnGoodnight closed 2 months ago

LynnGoodnight commented 2 months ago

Hi, recently I use your packages and encounter with this error message when I use the test example in your tutorial https://jmw86069.github.io/venndir/ :

setlist_dir <- make_venn_test(100, 3, do_signed=TRUE)
setlist_dir
venndir(setlist_dir, overlap_type="each")
venndir(setlist_dir)

Error in c("factor", "ordered") %in% class(i) && TRUE %in% honorFactor : 'length = 2' in coercion to 'logical(1)'

I also meet this error when I use my own data to run venndir function. I appreciate for your helps and thank for your great work :) .

sessionInfo() R version 4.4.0 (2024-04-24) Platform: x86_64-pc-linux-gnu Running under: Ubuntu 22.04.4 LTS

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

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

time zone: Etc/UTC tzcode source: system (glibc)

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

other attached packages: [1] farver_2.1.2 matrixStats_1.3.0 colorspace_2.1-0 venndir_0.0.30.900 [5] vctrs_0.6.5

loaded via a namespace (and not attached): [1] digest_0.6.35 jamba_0.0.100.900 fastmap_1.2.0
[4] xfun_0.44 colorjam_0.0.28.900 knitr_1.47
[7] htmltools_0.5.8.1 rmarkdown_2.27 cli_3.6.2
[10] data.table_1.15.4 compiler_4.4.0 rstudioapi_0.16.0
[13] tools_4.4.0 evaluate_0.23 yaml_2.3.8
[16] rlang_1.1.4

jmw86069 commented 2 months ago

Thank you for reporting! I put in an update yesterday with changes to the underlying code, the tutorial should be working properly now. Let me know if you encounter any problems with version 0.0.31.900 or higher.

Issue #7 reported that render_venndir() is not working as expected. To be fair I usually use venndir() directly, which avoids that problem. However, that problem should be resolved within a day or so.

jmw86069 commented 2 months ago

The underlying error should be fixed, please let me know if you encounter other errors, or have questions about how to do something. Thank you again for reporting the error!

LynnGoodnight commented 2 months ago

hi, thanks for your reply. sorry for my late reply. i re-install your package and test the same code agian

setlist_dir <- make_venn_test(100, 3, do_signed=TRUE)
setlist_dir
venndir(setlist_dir, overlap_type="each")
venndir(setlist_dir)
> venndir(setlist_dir)
Error in c("factor", "ordered") %in% class(i) && TRUE %in% honorFactor : 
  'length = 2' in coercion to 'logical(1)'

this error still persist.

sessionInfo() R version 4.4.0 (2024-04-24) Platform: x86_64-pc-linux-gnu Running under: Ubuntu 22.04.4 LTS

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

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

time zone: Etc/UTC tzcode source: system (glibc)

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

other attached packages: [1] farver_2.1.2 matrixStats_1.3.0 colorspace_2.1-0
[4] venndir_0.0.32.900

loaded via a namespace (and not attached): [1] vctrs_0.6.5 ggbeeswarm_0.7.2 cli_3.6.2
[4] knitr_1.47 rlang_1.1.4 xfun_0.45
[7] colorjam_0.0.28.900 generics_0.1.3 data.table_1.15.4
[10] glue_1.7.0 htmltools_0.5.8.1 jamba_0.0.100.900
[13] fansi_1.0.6 scales_1.3.0 rmarkdown_2.27
[16] grid_4.4.0 evaluate_0.23 munsell_0.5.1
[19] tibble_3.2.1 fastmap_1.2.0 yaml_2.3.8
[22] lifecycle_1.0.4 BiocManager_1.30.23 vipor_0.4.7
[25] compiler_4.4.0 dplyr_1.1.4 pkgconfig_2.0.3
[28] rstudioapi_0.16.0 beeswarm_0.4.0 digest_0.6.35
[31] R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4
[34] pillar_1.9.0 magrittr_2.0.3 tools_4.4.0
[37] gtable_0.3.5 ggplot2_3.5.1 remotes_2.5.0