calc_delta_var {biosampleR}R Documentation

Calculate the change in variance with increasing number of sites

Description

Calculate the change in variance with increasing number of sites

Usage

calc_delta_var(
  data,
  col_name,
  site_name = "num_sites",
  rep_name = "rep",
  visualize = FALSE
)

Arguments

data

A data frame containing the biodiversity indices to analyze, for a different number of sites over multiple repetitions.

col_name

The name of the column containing the biodiversity index to analyze.

site_name

The name of the column containing the number of sites.

rep_name

The name of the column containing the repetition number.

visualize

A logical indicating whether to visualize the results.

Value

A data frame with the number of sites and the variance and standard deviation of the mean of the biodiversity index for each number of sites.

Examples

ss <- generate_subsamples(BCI,
                         min_sites = 1,
                        max_sites = 5,
                       step = 1,
                     reps = 5)
data <- ss
data  <- unlist(data, recursive = FALSE)
data <- do.call(rbind, data)

calc_delta_var(data,
             col_name = "richness",
           site_name = "num_sites",
        rep_name = "rep",
     visualize = TRUE)

[Package biosampleR version 1.0.4 Index]