sumstat: Occurrence database summary

View source: R/sampstat.R

sumstatR Documentation

Occurrence database summary

Description

The function calculates global statistics of the entire database

Usage

sumstat(
  x,
  tax = "genus",
  bin = "stg",
  coll = NULL,
  ref = NULL,
  duplicates = NULL
)

Arguments

x

(data.frame): The occurrence dataset.

tax

(character): The column name of taxon names.

bin

(character): The column name of bin names.

coll

(character): The column name of collection numbers. (optional)

ref

(character): The column name of reference numbers. (optional)

duplicates

(logical): The function will check whether there are duplicate occurrences (multiple species/genera). When set to NULL, nothing will happen, but the function will notify you if duplicates are present. If set to TRUE, the function will not do anything with these, if set to FALSE, the duplicates will be omitted.

Details

The function returns the following values.

bins: The total number of bins sampled.

occs: The total number of sampled occurrences.

colls: The total number of sampled collections.

refs: The total number of sampled references.

taxa: The total number of sampled taxa.

gappiness: The proportion of sampling gaps in the ranges of the taxa (without the range-endpoints).

Value

A named numeric vector.

Examples

data(corals)
  sumstat(corals, tax="genus", bin="stg", coll="collection_no", ref="reference_no")

divDyn/r_package documentation built on Sept. 11, 2022, 9:29 p.m.