diff --git a/DESCRIPTION b/DESCRIPTION index fbce070..8e372a1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: canaper Title: Categorical Analysis of Neo- And Paleo-Endemism -Version: 0.0.2 +Version: 0.0.3 Authors@R: c( person(given = "Joel H.", @@ -29,9 +29,9 @@ Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE, roclets = c ("collate", "namespace", "rd", "roxyglobals::global_roclet", "srr::srr_stats_roclet")) RoxygenNote: 7.2.1 -URL: https://github.com/joelnitta/canaper, - https://joelnitta.github.io/canaper/ -BugReports: https://github.com/joelnitta/canaper/issues +URL: https://github.com/ropensci/canaper, + https://docs.ropensci.org/canaper/ +BugReports: https://github.com/ropensci/canaper/issues Imports: ape, assertr, diff --git a/NEWS.md b/NEWS.md index 87d753a..b4714ab 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,32 +1,60 @@ +canaper 0.0.3 +=============== + +Includes improvements in response to review on ropensci (https://github.com/ropensci/software-review/issues/475) +### DOCUMENTATION + +* Update README with comparisons to other packages (d8aaf8de5193166d52ab890d8267090ea2f8ef6a) + +* Add link to CONTRIBUTING.md to README (d8aaf8de5193166d52ab890d8267090ea2f8ef6a) + +* Change Depends: R (>= 3.5.0) to Depends: R (>= 4.1.0) in DESCRIPTION (0f334965fb5a3fe5034eb1bc682b5051548eddb1) + +* Add @KlausVigo as reviewer to DESCRIPTION (6e9b3d55202e2294a6436280ca6b01db13d92974) + +### BUG FIXES + +* Delete redundant checks in internal functions (bccd0278dd3de5853680d9979ca26c1aa38a7fb3) + +### TESTS + +* Make skipping of extended tests default (https://github.com/joelnitta/canaper/blob/76c277490dcecd0f32df351c48c8f8c891674aad/tests/testthat/test-cpr_rand_test.R#L395) + +* Decrease number of replicates so tests finish faster (12bbe36bf5516a2a63c1235c76234708c4c5432d, f3af4671d679020aeaa97b1a038b3b5a96633f42) + +### OTHER + +* Import functions from phyloregion instead of copying (7e8b24950912bfa2a5e10cf4dd9cfa8910d74e76) + canaper 0.0.2 =============== ### BUG FIXES -* [Fix bug](https://github.com/joelnitta/canaper/commit/acb40172c2d5ffb04e13519c6cad7c6d00fa451a) where `cpr_rand_test()` was failing to return identical results after `set.seed()` when parallelization is on +* [Fix bug](https://github.com/ropensci/canaper/commit/acb40172c2d5ffb04e13519c6cad7c6d00fa451a) where `cpr_rand_test()` was failing to return identical results after `set.seed()` when parallelization is on canaper 0.0.1 =============== ### NEW FEATURES -* [Add `cpr_rand_comm()` function](https://github.com/joelnitta/canaper/commit/2f3318c1d62f401d7c99bdcc16c64194359c3fbe) for generating a random community +* [Add `cpr_rand_comm()` function](https://github.com/ropensci/canaper/commit/2f3318c1d62f401d7c99bdcc16c64194359c3fbe) for generating a random community * Implement user-provided community matrix randomization functions ### BREAKING CHANGES -* [Use `vegan`](https://github.com/joelnitta/canaper/commit/b0a2d47130398eb62e28eba4783057f781763645) for community matrix randomizations instead of `picante` +* [Use `vegan`](https://github.com/ropensci/canaper/commit/b0a2d47130398eb62e28eba4783057f781763645) for community matrix randomizations instead of `picante` ### BUG FIXES -* [Fix error](https://github.com/joelnitta/canaper/commit/2f3318c1d62f401d7c99bdcc16c64194359c3fbe) in classification of endemism types with `cpr_classify_endem()`, +* [Fix error](https://github.com/ropensci/canaper/commit/2f3318c1d62f401d7c99bdcc16c64194359c3fbe) in classification of endemism types with `cpr_classify_endem()`, where super-endemic cells were previously being assigned if `pe_obs_p_upper` **or** `pe_obs_alt_p_upper` were highly significant (P > 0.99), to requiring **both** to be highly significant -* [Fix calculation](https://github.com/joelnitta/canaper/commit/50ed6e975d14adba334f06a984d521ff69ed961c) of RPD, RPE where alternative tree had all branch lengths +* [Fix calculation](https://github.com/ropensci/canaper/commit/50ed6e975d14adba334f06a984d521ff69ed961c) of RPD, RPE where alternative tree had all branch lengths converted to same value, to converting only non-zero branch lengths to same value diff --git a/README.Rmd b/README.Rmd index 6c2a272..4c2454c 100644 --- a/README.Rmd +++ b/README.Rmd @@ -19,28 +19,32 @@ knitr::opts_chunk$set( <!-- badges: start --> [![DOI](https://zenodo.org/badge/359280907.svg)](https://zenodo.org/badge/latestdoi/359280907) -[![R-CMD-check](https://github.com/joelnitta/canaper/workflows/R-CMD-check/badge.svg)](https://github.com/joelnitta/canaper/actions) +[![R-CMD-check](https://github.com/ropensci/canaper/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/canaper/actions) [![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) -[![Codecov test coverage](https://codecov.io/gh/joelnitta/canaper/branch/main/graph/badge.svg)](https://codecov.io/gh/joelnitta/canaper?branch=main) +[![Codecov test coverage](https://codecov.io/gh/ropensci/canaper/branch/main/graph/badge.svg)](https://codecov.io/gh/ropensci/canaper?branch=main) <!-- badges: end --> ```{r srr-tags-intro, eval = FALSE, echo = FALSE} #' @srrstats {G1.1} documents novelty ``` -The goal of canaper is to enable [categorical analysis of neo- and paleo-endemism (CANAPE)](https://doi.org/10.1038/ncomms5473) in **R**. This is the first implementation in **R** of CANAPE, which was previously only available in [Biodiverse](http://shawnlaffan.github.io/biodiverse/). +The goal of `canaper` is to enable [categorical analysis of neo- and paleo-endemism (CANAPE)](https://doi.org/10.1038/ncomms5473) in **R**. This is the first implementation in **R** of CANAPE, which was previously only available in [Biodiverse](http://shawnlaffan.github.io/biodiverse/). -## Important note +## Installation -**This package is in early development.** There may be major, breaking changes to functionality in the near future. If you use this package, I highly recommend using a package manager like [renv](https://rstudio.github.io/renv/articles/renv.html) so that later updates won't break your code. +`canaper` is not currently available on CRAN. -## Installation +You can install `canaper` from [r-universe](https://r-universe.dev) with: -You can install canaper from [GitHub](https://github.com/) with: +``` r +install.packages("canaper", repos = "https://ropensci.r-universe.dev") +``` + +or, you can install `canaper` from [GitHub](https://github.com/) with: ``` r # install.packages("remotes") -remotes::install_github("joelnitta/canaper") +remotes::install_github("ropensci/canaper") ``` ## Example usage @@ -105,7 +109,7 @@ This data set is very small, so it doesn't include all possible endemism types. - `mixed`: mixture of both paleo and neo - `super`: mixed and highly significant (*p* < 0.01) -For a more complete example, please [see the vignette](https://joelnitta.github.io/canaper/articles/canape.html) +For a more complete example, please [see the vignette](https://docs.ropensci.org/canaper/articles/canape.html) ## Comparsion with other software @@ -128,9 +132,7 @@ Poster at [Botany 2021](https://2021.botanyconference.org/) If you use this package, please cite it! Here is an example: -``` -Nitta JH, Laffan SW, Mishler BD, Iwasaki W. (2021) canaper: Categorical analysis of neo- and paleo-endemism in R. doi: 10.5281/zenodo.5094032 -``` +- Nitta JH, Laffan SW, Mishler BD, Iwasaki W. (2021) canaper: Categorical analysis of neo- and paleo-endemism in R. doi: 10.5281/zenodo.5094032 The example DOI above is for the overall package. @@ -156,8 +158,8 @@ Please note that this package is released with a [Contributor Code of Conduct](h - Code: [MIT](LICENSE.md) - Example datasets - - `acacia`, `biod_example`: [GNU General Public License v3.0](https://github.com/joelnitta/canaper/blob/main/data-raw/LICENSE-gpl.txt) - - `phylocom`: [BSD-3-Clause](https://github.com/joelnitta/canaper/blob/main/data-raw/LICENSE-bsd3.txt) + - `acacia`, `biod_example`: [GNU General Public License v3.0](https://github.com/ropensci/canaper/blob/main/data-raw/LICENSE-gpl.txt) + - `phylocom`: [BSD-3-Clause](https://github.com/ropensci/canaper/blob/main/data-raw/LICENSE-bsd3.txt) ## References diff --git a/README.md b/README.md index 0d002b6..603672c 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,15 @@ <!-- badges: start --> [![DOI](https://zenodo.org/badge/359280907.svg)](https://zenodo.org/badge/latestdoi/359280907) -[![R-CMD-check](https://github.com/joelnitta/canaper/workflows/R-CMD-check/badge.svg)](https://github.com/joelnitta/canaper/actions) +[![R-CMD-check](https://github.com/ropensci/canaper/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/canaper/actions) [![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) [![Codecov test -coverage](https://codecov.io/gh/joelnitta/canaper/branch/main/graph/badge.svg)](https://codecov.io/gh/joelnitta/canaper?branch=main) +coverage](https://codecov.io/gh/ropensci/canaper/branch/main/graph/badge.svg)](https://codecov.io/gh/ropensci/canaper?branch=main) <!-- badges: end --> -The goal of canaper is to enable [categorical analysis of neo- and +The goal of `canaper` is to enable [categorical analysis of neo- and paleo-endemism (CANAPE)](https://doi.org/10.1038/ncomms5473) in **R**. This is the first implementation in **R** of CANAPE, which was previously only available in @@ -23,19 +23,22 @@ previously only available in ## Important note -**This package is in early development.** There may be major, breaking -changes to functionality in the near future. If you use this package, I -highly recommend using a package manager like -[renv](https://rstudio.github.io/renv/articles/renv.html) so that later -updates won’t break your code. - ## Installation -You can install canaper from [GitHub](https://github.com/) with: +`canaper` is not currently available on CRAN. + +You can install `canaper` from [r-universe](https://r-universe.dev) +with: + +``` r +install.packages("canaper", repos = "https://ropensci.r-universe.dev") +``` + +or, you can install `canaper` from [GitHub](https://github.com/) with: ``` r # install.packages("remotes") -remotes::install_github("joelnitta/canaper") +remotes::install_github("ropensci/canaper") ``` ## Example usage @@ -162,7 +165,7 @@ types. In total, they include: - `super`: mixed and highly significant (*p* \< 0.01) For a more complete example, please [see the -vignette](https://joelnitta.github.io/canaper/articles/canape.html) +vignette](https://docs.ropensci.org/canaper/articles/canape.html) ## Comparsion with other software @@ -186,12 +189,12 @@ comprehensive description of each package. `frequency`, `richness`, `independentswap`, and `trialswap`. - [vegan](https://github.com/vegandevs/vegan): Performs a large range of mostly non-phylogenetic diversity analyses. Includes the largest - selection of null models (\> 20), according to data type (binary + selection of null models (> 20), according to data type (binary vs. quantitative). `canaper` uses `vegan` to randomize community matrices. - [biodiverse](http://shawnlaffan.github.io/biodiverse/): Not an R package, but software written in perl with a GUI. Performs all of - the calculations needed for CANAPE, and many other metrics (\> 300). + the calculations needed for CANAPE, and many other metrics (> 300). Includes `rand_structured` null model as well as spatially structured null models. None of these null models are currently available in any R packages AFAIK, except for `independentswap`. @@ -207,7 +210,9 @@ Poster at [Botany 2021](https://2021.botanyconference.org/) If you use this package, please cite it! Here is an example: - Nitta JH, Laffan SW, Mishler BD, Iwasaki W. (2021) canaper: Categorical analysis of neo- and paleo-endemism in R. doi: 10.5281/zenodo.5094032 +- Nitta JH, Laffan SW, Mishler BD, Iwasaki W. (2021) canaper: + Categorical analysis of neo- and paleo-endemism in R. doi: + 10.5281/zenodo.5094032 The example DOI above is for the overall package. @@ -247,9 +252,9 @@ project, you agree to abide by its terms. - Code: [MIT](LICENSE.md) - Example datasets - `acacia`, `biod_example`: [GNU General Public License - v3.0](https://github.com/joelnitta/canaper/blob/main/data-raw/LICENSE-gpl.txt) + v3.0](https://github.com/ropensci/canaper/blob/main/data-raw/LICENSE-gpl.txt) - `phylocom`: - [BSD-3-Clause](https://github.com/joelnitta/canaper/blob/main/data-raw/LICENSE-bsd3.txt) + [BSD-3-Clause](https://github.com/ropensci/canaper/blob/main/data-raw/LICENSE-bsd3.txt) ## References diff --git a/_pkgdown.yml b/_pkgdown.yml index af11d80..d55d5f7 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,4 +1,4 @@ -url: https://joelnitta.github.io/canaper/ +url: https://docs.ropensci.org/canaper/ home: title: Categorical Analysis of Neo- and Paleo-endemism in R description: | diff --git a/codemeta.json b/codemeta.json index af1775f..eabf85c 100644 --- a/codemeta.json +++ b/codemeta.json @@ -4,11 +4,11 @@ "identifier": "canaper", "description": "Provides functions to conduct categorical analysis of neo- and paleo-endemism (CANAPE).", "name": "canaper: Categorical Analysis of Neo- And Paleo-Endemism", - "relatedLink": "https://joelnitta.github.io/canaper/", - "codeRepository": "https://github.com/joelnitta/canaper", - "issueTracker": "https://github.com/joelnitta/canaper/issues", + "relatedLink": "https://docs.ropensci.org/canaper/", + "codeRepository": "https://github.com/ropensci/canaper", + "issueTracker": "https://github.com/ropensci/canaper/issues", "license": "https://spdx.org/licenses/MIT", - "version": "0.0.2", + "version": "0.0.3", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", @@ -385,7 +385,7 @@ }, "SystemRequirements": null }, - "fileSize": "9237.93KB", + "fileSize": "280.144KB", "citation": [ { "@type": "SoftwareSourceCode", @@ -404,14 +404,12 @@ ], "name": "canaper: Categorical analysis of neo- and paleo-endemism in {R}", "identifier": "10.5281/zenodo.5094032", - "url": "https://github.com/joelnitta/canaper", + "url": "https://github.com/ropensci/canaper", "@id": "https://doi.org/10.5281/zenodo.5094032", "sameAs": "https://doi.org/10.5281/zenodo.5094032" } ], - "releaseNotes": "https://github.com/joelnitta/canaper/blob/master/NEWS.md", - "readme": "https://github.com/joelnitta/canaper/blob/main/README.md", - "contIntegration": ["https://github.com/joelnitta/canaper/actions", "https://codecov.io/gh/joelnitta/canaper?branch=main"], - "developmentStatus": "https://www.repostatus.org/#wip", - "keywords": ["biodiversity", "canape"] + "releaseNotes": "https://github.com/ropensci/canaper/blob/master/NEWS.md", + "contIntegration": ["https://github.com/ropensci/canaper/actions", "https://codecov.io/gh/ropensci/canaper?branch=main"], + "developmentStatus": "https://www.repostatus.org/#wip" } diff --git a/inst/CITATION b/inst/CITATION index e49081f..aaf61d2 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -1,4 +1,4 @@ -citHeader("This is how you can cite canaper in publications (please replace the DOI below with the one matching the version in use; for more information, see the README at https://github.com/joelnitta/canaper)") +citHeader("This is how you can cite canaper in publications (please replace the DOI below with the one matching the version in use; for more information, see the README at https://github.com/ropensci/canaper)") citEntry( entry = "Manual", @@ -7,7 +7,7 @@ citEntry( as.person("Wataru Iwasaki") ), year = "2021", - url = "https://github.com/joelnitta/canaper", + url = "https://github.com/ropensci/canaper", doi = "10.5281/zenodo.5094032", textVersion = paste("Nitta JH, Iwasaki W. (2021) canaper: Categorical analysis of neo- and paleo-endemism in R. doi: 10.5281/zenodo.5094032") ) diff --git a/inst/WORDLIST b/inst/WORDLIST index 973aa97..f0e9ddb 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -20,6 +20,8 @@ branchlengths BugReports canaper centroids +citEntry +citHeader CMD cmd Codecov @@ -84,6 +86,7 @@ io issueTracker Iwasaki JamesIves +JH joelnitta Kembel Knerr @@ -132,6 +135,7 @@ params parellelization pc perl +personList phangorn phylo Phylocom @@ -162,6 +166,7 @@ reprex rmarkdown roclet roclets +ropensci Rosauer Roxygen roxygen @@ -194,6 +199,7 @@ Sublicensing sudo SystemRequirements testthat +textVersion tibble tictoc tidyverse diff --git a/man/canaper-package.Rd b/man/canaper-package.Rd index 90711b2..4e7c9cb 100644 --- a/man/canaper-package.Rd +++ b/man/canaper-package.Rd @@ -11,9 +11,9 @@ Provides functions to conduct categorical analysis of neo- and paleo-endemism (C \seealso{ Useful links: \itemize{ - \item \url{https://github.com/joelnitta/canaper} - \item \url{https://joelnitta.github.io/canaper/} - \item Report bugs at \url{https://github.com/joelnitta/canaper/issues} + \item \url{https://github.com/ropensci/canaper} + \item \url{https://docs.ropensci.org/canaper/} + \item Report bugs at \url{https://github.com/ropensci/canaper/issues} } } diff --git a/vignettes/canape.Rmd b/vignettes/canape.Rmd index 7883061..8f55059 100644 --- a/vignettes/canape.Rmd +++ b/vignettes/canape.Rmd @@ -70,10 +70,10 @@ The main purpose of `canaper` is to perform these randomization tests. `canaper` generates random communities using the [`vegan` package](https://CRAN.R-project.org/package=vegan). There are a large number of pre-defined randomization algorithms available in `vegan`^[`r length(unique(vegan::make.commsim()))` as of `vegan` v`r as.character(packageVersion("vegan"))`, though not all may be applicable.], as well as an option to provide a user-defined algorithm. Selecting the appropriate algorithm is not trivial, and can greatly influence results^[For a good review of randomization algorithms and their implications for analysis results, see @Strona2018]. For details about the pre-defined algorithms, see `vegan::commsim()`. -This example also demonstrates one of the strengths of `canaper`: the ability to run randomizations in parallel^[For more information on how and when to use parallel computing in `canaper`, [see the "Parallel computing" vignette](https://joelnitta.github.io/canaper/articles/parallel.html)]. +This example also demonstrates one of the strengths of `canaper`: the ability to run randomizations in parallel^[For more information on how and when to use parallel computing in `canaper`, [see the "Parallel computing" vignette](https://docs.ropensci.org/canaper/articles/parallel.html)]. This is by far the most time-consuming part of CANAPE, since we have to repeat the calculations many (e.g., hundreds or more) times across the randomized communities to obtain reliable results. Here, we set the number of iterations (`n_iterations`; i.e., the number of swaps used to produce each randomized community) fairly high because this community matrix is large and includes many zeros; thorough mixing by swapping many times is required to completely randomize the matrix. -We will use a low number of random communities (`n_reps`) so things finish relatively quickly; you should consider increasing `n_reps` for a "real" analysis^[For more information on setting the appropriate number of iterations and replicates, [see the "How many randomizations?" vignette](https://joelnitta.github.io/canaper/articles/how-many-rand.html).]. +We will use a low number of random communities (`n_reps`) so things finish relatively quickly; you should consider increasing `n_reps` for a "real" analysis^[For more information on setting the appropriate number of iterations and replicates, [see the "How many randomizations?" vignette](https://docs.ropensci.org/canaper/articles/how-many-rand.html).]. We will use the `curveball` randomization algorithm, which maintains species richness and abundance patterns while randomizing species identity [@Strona2014]^[`curveball` is similar to `swap` but runs much faster so I chose it for this large dataset.]. ```{r acacia-rand} diff --git a/vignettes/how-many-rand.Rmd b/vignettes/how-many-rand.Rmd index db0c245..f20f66d 100644 --- a/vignettes/how-many-rand.Rmd +++ b/vignettes/how-many-rand.Rmd @@ -22,7 +22,7 @@ knitr::opts_chunk$set( A central part of CANAPE is comparing observed values with randomizations. It is up to the user to set the number of randomizations... but how does one know if the number of randomizations is sufficient? -(**This vignette assumes a basic understanding of CANAPE, community data matrices, and randomizations**. If you aren't familiar with any of these, you should probably see the [the CANAPE example vignette](https://joelnitta.github.io/canaper/articles/canape.html) first). +(**This vignette assumes a basic understanding of CANAPE, community data matrices, and randomizations**. If you aren't familiar with any of these, you should probably see the [the CANAPE example vignette](https://docs.ropensci.org/canaper/articles/canape.html) first). ## A word about randomization algorithms @@ -56,7 +56,7 @@ library(tidyverse) # For tidy code library(future) # For parallelization ``` -Next we will test the effects of `n_iterations`, using the [test dataset that comes with `canaper`](https://joelnitta.github.io/canaper/reference/biod_example.html) (and [Biodiverse](https://github.com/shawnlaffan/biodiverse/tree/master/data)). I will increase the number of iterations in powers of 10 from 10 to 1,000,000, and compare the correlation between the original matrix and the randomized matrix: +Next we will test the effects of `n_iterations`, using the [test dataset that comes with `canaper`](https://docs.ropensci.org/canaper/reference/biod_example.html) (and [Biodiverse](https://github.com/shawnlaffan/biodiverse/tree/master/data)). I will increase the number of iterations in powers of 10 from 10 to 1,000,000, and compare the correlation between the original matrix and the randomized matrix: ```{r test-n-iter} # "swap" produces a binary matrix, so convert the input matrix to binary too: @@ -105,7 +105,7 @@ Now that we've settled on the number of iterations per random replicate, let's l With randomizations, there is no "right" answer, so we can't test to see that `cpr_rand_test()` produces the exact answer we're looking for. Rather, we will check that it starts to **converge on approximately the same result** once `n_reps` is high enough. -Here, I will compare the percentile of observed phylogenetic diversity relative to random (`pd_obs_p_upper`, [one of the values used for calculating endemism type](https://joelnitta.github.io/canaper/articles/canape.html#classify-endemism)) between pairs of random communities each generated with the same number of replicates^[Other values based on the randomizations could be checked too (e.g., values ending in `_obs_z`, `_rand_mean`, or `_rand_sd`).]. I will also time calculations for one of each pair. +Here, I will compare the percentile of observed phylogenetic diversity relative to random (`pd_obs_p_upper`, [one of the values used for calculating endemism type](https://docs.ropensci.org/canaper/articles/canape.html#classify-endemism)) between pairs of random communities each generated with the same number of replicates^[Other values based on the randomizations could be checked too (e.g., values ending in `_obs_z`, `_rand_mean`, or `_rand_sd`).]. I will also time calculations for one of each pair. ```{r n-reps-sets} # Specify a different random seed for each set of randomizations so they give @@ -211,11 +211,11 @@ bind_rows( At 1,000 replicates, we see very high agreement on endemism type between the two randomizations. -Of course, another important consideration is **how long** calculations take. You can see that time increases with `n_reps`, but not exactly in a linear fashion. We don't have the space to go into benchmarking here, but this illustrates the time / `n_reps` trade-off^[You can of course speed things up with parallelization, as done here. For details, see [the CANAPE example vignette](https://joelnitta.github.io/canaper/articles/canape.html#randomization-test).]. +Of course, another important consideration is **how long** calculations take. You can see that time increases with `n_reps`, but not exactly in a linear fashion. We don't have the space to go into benchmarking here, but this illustrates the time / `n_reps` trade-off^[You can of course speed things up with parallelization, as done here. For details, see [the CANAPE example vignette](https://docs.ropensci.org/canaper/articles/canape.html#randomization-test).]. ## Conclusion -In this case (the [example dataset](https://joelnitta.github.io/canaper/reference/biod_example.html) that comes with `canaper`), we see that a minimum of 1,000 random replicates with 10,000 swapping iterations per replicate is probably needed to attain robust results. +In this case (the [example dataset](https://docs.ropensci.org/canaper/reference/biod_example.html) that comes with `canaper`), we see that a minimum of 1,000 random replicates with 10,000 swapping iterations per replicate is probably needed to attain robust results. I hope this vignette helps you determine the settings to use for your own dataset! diff --git a/vignettes/parallel.Rmd b/vignettes/parallel.Rmd index 8982d9c..89786d4 100644 --- a/vignettes/parallel.Rmd +++ b/vignettes/parallel.Rmd @@ -20,7 +20,7 @@ knitr::opts_chunk$set( One feature of `canaper` is the ability to use parallel computing (running calculations on multiple CPUs simultaneously) to speed up analysis. The parallel computing is used during the randomizations carried out by `cpr_rand_test()`, since this function involves calculating the same values on many random replicates. This vignette shows how and when to use parallel computing to speed up `cpr_rand_test()`. -(**This vignette assumes a basic understanding of CANAPE, community data matrices, and randomizations**. If you aren't familiar with any of these, you should probably see the [the CANAPE example vignette](https://joelnitta.github.io/canaper/articles/canape.html) first). +(**This vignette assumes a basic understanding of CANAPE, community data matrices, and randomizations**. If you aren't familiar with any of these, you should probably see the [the CANAPE example vignette](https://docs.ropensci.org/canaper/articles/canape.html) first). Let's get started by loading the packages used in this vignette.