gaospecial / ggVennDiagram

A 'ggplot2' implement of Venn Diagram.
https://gaospecial.github.io/ggVennDiagram/
GNU General Public License v3.0
277 stars 37 forks source link

Get the error of "Error: Input must be a vector, not a `sfc_LINESTRING/sfc` object." #24

Closed EasyPiPi closed 3 years ago

EasyPiPi commented 3 years ago

Hi,

I really like the Venn plot generated by the package, however, when I tried the example code:

> genes <- paste("gene",1:1000,sep="")
> set.seed(20210419)
> x <- list(A=sample(genes,300),
+           B=sample(genes,525),
+           C=sample(genes,440),
+           D=sample(genes,350))
> ggVennDiagram(x)

I got an error of "Error: Input must be a vector, not a sfc_LINESTRING/sfc object."

> class(x)
[1] "list"

Any clues why it doesn't accept my input?

Best, Yixin

Below is my sessionInfo()

R version 3.6.1 (2019-07-05) Platform: x86_64-conda_cos6-linux-gnu (64-bit) Running under: Ubuntu 18.04.5 LTS

Matrix products: default BLAS/LAPACK: /home/yixin/software/anaconda3/envs/Sun_et_al_2020/lib/libopenblasp-r0.3.10.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] ggVennDiagram_1.1.1 ggtree_2.0.4 cowplot_1.1.0 forcats_0.5.0 stringr_1.4.0
[6] dplyr_1.0.2 purrr_0.3.4 readr_1.3.1 tidyr_1.1.2 tibble_3.0.3
[11] ggplot2_3.3.2 tidyverse_1.3.0 Seurat_3.2.2

loaded via a namespace (and not attached): [1] readxl_1.3.1 backports_1.1.10 plyr_1.8.6 igraph_1.2.4.2 lazyeval_0.2.2
[6] splines_3.6.1 listenv_0.8.0 usethis_1.6.3 digest_0.6.25 htmltools_0.5.0
[11] fansi_0.4.1 magrittr_1.5 memoise_1.1.0 tensor_1.5 cluster_2.1.0
[16] ROCR_1.0-11 remotes_2.2.0 limma_3.42.0 globals_0.13.0 modelr_0.1.8
[21] matrixStats_0.57.0 prettyunits_1.1.1 RVenn_1.1.0 colorspace_1.4-1 blob_1.2.1
[26] rvest_0.3.6 rappdirs_0.3.1 ggrepel_0.8.2 haven_2.3.1 callr_3.4.4
[31] crayon_1.3.4 jsonlite_1.7.1 spatstat_1.64-1 spatstat.data_1.4-3 survival_3.2-7
[36] zoo_1.8-8 ape_5.4-1 glue_1.4.2 polyclip_1.10-0 gtable_0.3.0
[41] leiden_0.3.3 pkgbuild_1.1.0 future.apply_1.6.0 abind_1.4-5 scales_1.1.1
[46] DBI_1.1.0 miniUI_0.1.1.1 Rcpp_1.0.5 viridisLite_0.3.0 xtable_1.8-4
[51] units_0.7-1 tidytree_0.3.3 reticulate_1.16 proxy_0.4-25 rsvd_1.0.3
[56] htmlwidgets_1.5.1 httr_1.4.2 RColorBrewer_1.1-2 ellipsis_0.3.1 ica_1.0-2
[61] pkgconfig_2.0.3 farver_2.0.3 uwot_0.1.8 dbplyr_1.4.4 deldir_0.1-29
[66] utf8_1.1.4 tidyselect_1.1.0 labeling_0.3 rlang_0.4.7 reshape2_1.4.4
[71] later_1.1.0.1 munsell_0.5.0 cellranger_1.1.0 tools_3.6.1 cli_2.0.2
[76] generics_0.0.2 devtools_2.3.2 broom_0.7.0 ggridges_0.5.2 fastmap_1.0.1
[81] yaml_2.2.1 goftest_1.2-2 processx_3.4.4 fs_1.5.0 fitdistrplus_1.1-1
[86] RANN_2.6.1 pbapply_1.4-3 future_1.19.1 nlme_3.1-149 mime_0.9
[91] aplot_0.0.6 xml2_1.3.2 compiler_3.6.1 rstudioapi_0.11 curl_4.3
[96] plotly_4.9.2.1 png_0.1-7 e1071_1.7-6 testthat_2.3.2 spatstat.utils_1.17-0 [101] reprex_0.3.0 treeio_1.10.0 stringi_1.5.3 ps_1.3.4 desc_1.2.0
[106] lattice_0.20-41 Matrix_1.2-18 classInt_0.4-3 vctrs_0.3.4 pillar_1.4.6
[111] lifecycle_0.2.0 BiocManager_1.30.12 lmtest_0.9-38 RcppAnnoy_0.0.16 data.table_1.12.8
[116] irlba_2.3.3 httpuv_1.5.4 patchwork_1.1.1 R6_2.4.1 promises_1.1.1
[121] KernSmooth_2.23-17 gridExtra_2.3 sessioninfo_1.1.1 codetools_0.2-16 MASS_7.3-53
[126] assertthat_0.2.1 pkgload_1.1.0 rprojroot_1.3-2 withr_2.3.0 sctransform_0.3
[131] mgcv_1.8-33 parallel_3.6.1 hms_0.5.3 grid_3.6.1 rpart_4.1-15
[136] class_7.3-19 rvcheck_0.1.8 Rtsne_0.15 sf_0.7-6 shiny_1.5.0
[141] lubridate_1.7.9

gaospecial commented 3 years ago

Due to your system settings, I currently have no fine resolution. But it should be related to your R package versions, particulary the sf package. Can you just check whether your sf package works well, or update it by install.packages("sf") and try again.