From f2d298eb689a267b1c89cf35fe339c716b3c7e06 Mon Sep 17 00:00:00 2001 From: Neander Marcel Heming Date: Fri, 21 Jul 2023 16:37:57 -0300 Subject: [PATCH] small changes in null-models vignette --- DESCRIPTION | 1 - R/SESraster.R | 4 ++-- inst/pkgdown.yml | 2 +- man/algorithm_metrics.Rd | 4 ++-- vignettes/null-models.Rmd | 12 ++++++------ 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c06f524..0926daf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -33,7 +33,6 @@ Suggests: kableExtra, knitr, rmarkdown, - bookdown, testthat (>= 3.0.0) VignetteBuilder: knitr diff --git a/R/SESraster.R b/R/SESraster.R index 27fbad9..a2b0e3d 100644 --- a/R/SESraster.R +++ b/R/SESraster.R @@ -259,8 +259,8 @@ SESraster <- function(x, #' library(SESraster) #' library(terra) #' r <- load_ext_data() -#' algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="species"), aleats = 4) -#' algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="site"), aleats = 4) +#' algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="species"), aleats = 3) +#' algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="site"), aleats = 3) #' # algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="both")) #' #' @export diff --git a/inst/pkgdown.yml b/inst/pkgdown.yml index 6a10996..7b8df13 100644 --- a/inst/pkgdown.yml +++ b/inst/pkgdown.yml @@ -5,7 +5,7 @@ articles: SES: SES.html null-models: null-models.html spatial-null-models: spatial-null-models.html -last_built: 2023-07-17T18:50Z +last_built: 2023-07-21T19:33Z urls: reference: https://hemingnm.github.io/SESraster/reference article: https://hemingnm.github.io/SESraster/articles diff --git a/man/algorithm_metrics.Rd b/man/algorithm_metrics.Rd index ed04744..db7fc10 100644 --- a/man/algorithm_metrics.Rd +++ b/man/algorithm_metrics.Rd @@ -57,8 +57,8 @@ between actual and randomized species distributions library(SESraster) library(terra) r <- load_ext_data() -algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="species"), aleats = 4) -algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="site"), aleats = 4) +algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="species"), aleats = 3) +algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="site"), aleats = 3) # algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="both")) } diff --git a/vignettes/null-models.Rmd b/vignettes/null-models.Rmd index 5a4e47b..add3e48 100644 --- a/vignettes/null-models.Rmd +++ b/vignettes/null-models.Rmd @@ -2,10 +2,10 @@ title: "Null model algorithms" author: "Neander M. Heming, Flávio Mota, and Gabriela Alves-Ferreira" date: "`r Sys.Date()`" -output: - bookdown::html_document2: - base_format: rmarkdown::html_vignette - number_sections: FALSE +output: rmarkdown::html_vignette + #bookdown::html_document2: + # base_format: rmarkdown::html_vignette + # number_sections: FALSE vignette: > %\VignetteIndexEntry{Null model algorithms} %\VignetteEngine{knitr::rmarkdown} @@ -39,7 +39,7 @@ Null models have been widely used to analyze the patterns observed in nature in ## Algorithms {#algorithms} -The data for null model analyses usually consists of a binary presence-absence matrix, in which the entries represent the presence (1) or absence (0) of a particular species in a particular site, rows represent species or taxa, columns represent sites or samples [@ulrich2012]. Gotelli [-@gotelli2000] summarizes nine null model algorithms for species co-occurrence analysis based on how sums of species (originally rows) and sites (originally columns) are treated (i.e. fixed, equiprobable, or proportional sums; see Table \@ref(tab:table1)) [@gotelli2000]. When using raster data, layers represent species or taxa and cells represent sites or samples. `SESraster` currently implements six (green cells in Table \@ref(tab:table1)) of the nine algorithms for co-occurrence analysis. +The data for null model analyses usually consists of a binary presence-absence matrix, in which the entries represent the presence (1) or absence (0) of a particular species in a particular site, rows represent species or taxa, columns represent sites or samples [@ulrich2012]. There are nine major types of null model algorithms for species co-occurrence analysis based on how sums of species (originally rows) and sites (originally columns) are treated (i.e. fixed, equiprobable, or proportional sums; see Table 1; Table 2 of [@gotelli2000]). When using raster data, layers represent species or taxa and cells represent sites or samples. `SESraster` currently implements six (green cells in Table 1) of the nine algorithms for co-occurrence analysis summarized by Gotelli [-@gotelli2000]. ```{r table1-data, echo=FALSE} type <- c("Equiprobable", "Proportional", "Fixed") @@ -75,7 +75,7 @@ colnames(d) <- c(" ", " ", paste0("", type)) # opts_current$append(list(label = "table1")) kable(d, dbooktabs = TRUE, align=c("r", "c", "c", "c", "c"), escape = F, label = "table1", #format = "html", - caption = "Nine null model algorithms for species co-occurrence analysis listed in Gotelli (2000). Cells in green represent the algorithms currently implemented in SESraster.") %>% + caption = "Table 1. Nine null model algorithms for species co-occurrence analysis listed in Gotelli (2000). Cells in green represent the algorithms currently implemented in SESraster.") %>% collapse_rows() %>% kable_styling(bootstrap_options = c("bordered")) %>% add_header_above(c(" " = 2, "Site (Col, Cell)" = 3), background = "#F2F2F2") %>%