Skip to content

Commit

Permalink
small changes in null-models vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
HemingNM committed Jul 21, 2023
1 parent 665a104 commit f2d298e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Suggests:
kableExtra,
knitr,
rmarkdown,
bookdown,
testthat (>= 3.0.0)
VignetteBuilder:
knitr
Expand Down
4 changes: 2 additions & 2 deletions R/SESraster.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion inst/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions man/algorithm_metrics.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions vignettes/null-models.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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") %>%
Expand Down

0 comments on commit f2d298e

Please sign in to comment.