KaiHsiangHu / iNEXT.beta3D

iNterpolation and EXTrapolation with beta diversity for three dimensions of biodiversity
2 stars 3 forks source link

error in first step #3

Open MyosotisMatt opened 7 months ago

MyosotisMatt commented 7 months ago

Hi Kai,

I'm running into an error on the first step of the tutorial with the demo data.

Taxonomic diversity

data(Brazil_rainforests)

Abundance data

Abundance_TD = iNEXTbeta3D(data = Brazil_rainforests, diversity = 'TD', datatype = "abundance", base = 'coverage', nboot = 100)

Error in mutate(): ! Can't transform a data frame with duplicate names. Run rlang::last_trace() to see where the error occurred.

Backtrace: x

  1. +-iNEXT.beta3D::iNEXTbeta3D(...)
  2. | -base::lapply(...)
  3. | -iNEXT.beta3D (local) FUN(X[[i]], ...)
  4. | -iNEXT.beta3D (local) for_each_dataset(...)
  5. | +-... %>% ...
  6. | -... %>% ...
  7. +-base (local) set_colnames(., c("Estimate", "Order.q", "Method", "SC", "Size"))
  8. | -base::is.data.frame(x)
  9. +-dplyr::mutate(...)
    1. -dplyr:::mutate.data.frame(...)
    2. -dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
    3. -DataMask$new(data, by, "mutate", error_call = error_call)
    4. -dplyr (local) initialize(...)
    5. -rlang::abort(...)

Here is the session info

sessionInfo() R version 4.1.1 (2021-08-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252

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

other attached packages: [1] iNEXT.beta3D_1.0.1

loaded via a namespace (and not attached): [1] phangorn_2.11.1 tidyselect_1.2.0 purrr_1.0.1 reshape2_1.4.4
[5] listenv_0.9.0 lattice_0.20-44 phytools_1.9-16 colorspace_2.1-0
[9] vctrs_0.6.1 generics_0.1.3 expm_0.999-7 optimParallel_1.0-2
[13] utf8_1.2.2 rlang_1.1.0 pillar_1.9.0 glue_1.6.2
[17] tidyverse_2.0.0 foreach_1.5.2 lifecycle_1.0.3 plyr_1.8.8
[21] stringr_1.5.0 munsell_0.5.0 combinat_0.0-8 gtable_0.3.3
[25] future_1.32.0 codetools_0.2-18 coda_0.19-4 doParallel_1.0.17
[29] parallel_4.1.1 fansi_0.5.0 Rcpp_1.0.10 scales_1.2.1
[33] plotrix_3.8-2 clusterGeneration_1.3.7 scatterplot3d_0.3-43 abind_1.4-5
[37] parallelly_1.35.0 fastmatch_1.1-3 mnormt_2.1.1 ggplot2_3.4.2
[41] digest_0.6.31 stringi_1.7.12 dplyr_1.1.0 numDeriv_2016.8-1.1
[45] grid_4.1.1 ade4_1.7-22 quadprog_1.5-8 cli_3.6.1
[49] tools_4.1.1 yulab.utils_0.0.6 magrittr_2.0.3 maps_3.4.1
[53] iNEXT.3D_1.0.1 lazyeval_0.2.2 tibble_3.2.1 ape_5.7-1
[57] tidyr_1.3.0 future.apply_1.10.0 pkgconfig_2.0.3 phyclust_0.1-33
[61] MASS_7.3-54 Matrix_1.5-3 tidytree_0.4.2 rstudioapi_0.14
[65] iterators_1.0.14 R6_2.5.1 globals_0.16.2 igraph_1.4.1
[69] colorRamps_2.3.1 nlme_3.1-152 compiler_4.1.1

I've tried restating R several times and reinstalling the iNEXT.beta3D package and different versions of dplyr and rlang but this didn't change anything.

Thanks for any help!

KaiHsiangHu commented 7 months ago

Dear MyosotisMatt,

Thank you for your support about our lab package!

I'm so sorry about I don't know why this error happens. Can you please re-download 'iNEXT.beta3D' from github and 'iNEXT.3D' from CRAN at the same time again? I'm afraid this error comes from unmatched of these packages.

The package version of 'dplyr' in my computer is 1.1.2 and 'rlang' is 1.1.1. Maybe there is an error in them.

Besides, 'iNEXT.beta3D' will be submit to CRAN recently. We wish to provide convenient way to download package.

Hope to hear good news from you.

Thanks again. Best regards