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

Error in explodePolygons(x, ...) : use sf or terra functions) #4

Closed muir-a closed 9 months ago

muir-a commented 10 months ago

Hi James,

I'm running into an error when running the example code. Code and session info pasted below. I was hoping you could identify if this is a dependency or other issue. The venndir package appears ideal for what I want to do so it would be great if I could get it working.

Many thanks, Andrew

--- Code

library(venndir) Registered S3 method overwritten by 'data.table': method from print.data.table
rgeos version: 0.6-4, (SVN revision 699) GEOS runtime version: 3.8.3-CAPI-1.13.4 Please note that rgeos will be retired during October 2023, plan transition to sf or terra functions using GEOS at your earliest convenience. See https://r-spatial.org/r/2023/05/15/evolution4.html for details. Linking to sp version: 2.1-1 Polygon checking: TRUE options("warn"=-1) setlist <- make_venn_test(100, 3) venndir(setlist) Error in explodePolygons(x, ...) : use sf or terra functions)

--- sessionInfo()

R version 4.1.1 (2021-08-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS: /bi/apps/R/4.1.1/lib64/R/lib/libRblas.so LAPACK: /bi/apps/R/4.1.1/lib64/R/lib/libRlapack.so

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

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

other attached packages: [1] farver_2.1.1 matrixStats_1.0.0 colorspace_2.1-0 venndir_0.0.29.900

loaded via a namespace (and not attached): [1] lattice_0.20-45 digest_0.6.33 grid_4.1.1 evaluate_0.22 rlang_1.1.1
[6] cli_3.6.1 data.table_1.14.8 rstudioapi_0.14 sp_2.1-1 jamba_0.0.96.900
[11] rmarkdown_2.25 tools_4.1.1 colorjam_0.0.27.900 xfun_0.40 yaml_2.3.7
[16] fastmap_1.1.1 compiler_4.1.1 rgeos_0.6-4 htmltools_0.5.6 knitr_1.44

muir-a commented 9 months ago

Managed to find a fix. The issue seems to be because of the retirement of the 'rgeos' package; https://r-spatial.org/r/2023/05/15/evolution4.html Newer versions of the 'sp' package block 'rgeos' from being used; uninstalling 'sp' and reinstalling an earlier version circumvents this issue and now venndirr works normally. e.g.

remove/uninstall package "sp" then

library(remotes) install_version("sp", "1.6.1") # 1.6.1 is the last version prior to rgeos being blocked