An open API service indexing awesome lists of open source software.

https://github.com/kevcaz/ecoocc

:package: Occurrence / Co-occurrence / more
https://github.com/kevcaz/ecoocc

coocurrence ecological-modelling ecological-network r

Last synced: about 2 months ago
JSON representation

:package: Occurrence / Co-occurrence / more

Awesome Lists containing this project

README

        

---
title: "ecoocc"
output:
md_document
---

# ecoocc
[![R CMD Check](https://github.com/KevCaz/ecoocc/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/KevCaz/ecoocc/actions/workflows/R-CMD-check.yaml)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![codecov](https://codecov.io/gh/KevCaz/ecoocc/branch/master/graph/badge.svg?token=PahZ2gKXl2)](https://codecov.io/gh/KevCaz/ecoocc)

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

## Installation

The simplest way to install this packages is to use the [`remotes`](https://CRAN.R-project.org/package=remotes) package

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

Once installed, load it and try it!

```{r load}
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()`.

```{r generate, results = "hold"}
# a pa object of 10 and 5 species all species having a prensence probability of .4
ec_generate_pa(10, 5, .4)
```

### Beta diversity

```{r betadiv, results = "hold"}
(mat <- ec_generate_pa(5, 3, .5))
ec_betadiversity(mat)
```

### Rarefaction

```{r rare, results = "hold"}
(mat <- ec_generate_pa(10, 4, .4))
ec_rarefaction(mat, 6)
```

### Occurrence

```{r cooc, results = "hold"}
mat <- rbind(c(0,0,1), c(0,1,0))
ec_cooc(ec_pa(mat))
```

## Related works

## R :package:

- [`coocur`](https://CRAN.R-project.org/package=cooccur)
- [`PresenceAbsence`](https://CRAN.R-project.org/package=PresenceAbsence)
- [`EcoSimR`](https://CRAN.R-project.org/package=EcoSimR) (currently archived)
- [`ecospat`](https://CRAN.R-project.org/package=ecospat)

## Others

- [PRESENCE](https://www.mbr-pwrc.usgs.gov/software/doc/presence/presence.html)