ecoocc

Lifecycle: experimental R-CMD-check

A Rcpp implementation of various computations done on presence/absence matrices.

Installation

The simplest way to install this packages is to use the remotes package

install.package("remotes")
remotes::install_github("KevCaz/ecoocc")

Once installed, load it and try it!

library(ecoocc)

What is implemented so far?

Presence absence matrix

ec_as_pa() creates objects of class pa, there is a shortcut to randomly generate object of class pa quickly, ec_generate_pa().

# a pa object of 10 and 5 species all species having a prensence probability of .4
ec_generate_pa(10, 5, .4)

Beta diversity

(mat <- ec_generate_pa(5, 3, .5))
ec_betadiversity(mat)

Rarefaction

(mat <- ec_generate_pa(10, 4, .4))
ec_rarefaction(mat, 6)

Temporal beta diversity

r (mat <- rbind(c(0,0,1), c(0,1,0))) ec_cooc_count_pair(mat)

Occurrence

r mat <- rbind(c(0,0,1), c(0,1,0)) ec_cooc_count_pair(mat)



KevCaz/ecoocc documentation built on Aug. 7, 2021, 8:22 p.m.