ecoocc

R CMD Check Lifecycle: experimental codecov

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)

Occurrence

mat <- rbind(c(0,0,1), c(0,1,0))
ec_cooc(ec_pa(mat))

Related works

R :package:

Others



KevCaz/ecoocc documentation built on May 24, 2023, 1:43 p.m.