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
- Host: GitHub
- URL: https://github.com/kevcaz/ecoocc
- Owner: KevCaz
- License: gpl-2.0
- Created: 2018-02-28T20:10:49.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2023-05-20T17:59:16.000Z (about 2 years ago)
- Last Synced: 2025-02-10T12:35:54.146Z (3 months ago)
- Topics: coocurrence, ecological-modelling, ecological-network, r
- Language: R
- Homepage: http://kevcaz.insileco.io/ecoocc/
- Size: 3.56 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
---
title: "ecoocc"
output:
md_document
---# ecoocc
[](https://github.com/KevCaz/ecoocc/actions/workflows/R-CMD-check.yaml)
[](https://www.tidyverse.org/lifecycle/#experimental)
[](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)