R/RcppExports.R

Defines functions temporal_beta_core rarefaction_core cooccurrence_triplet_core cooc_overlap_core cooc_mututal_information_core cooc_zscore_hypergeom_core cooc_zscore_binomial_core cooccurrence_core betadiversity_core

Documented in betadiversity_core cooccurrence_core cooccurrence_triplet_core rarefaction_core temporal_beta_core

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' @name betadiversity_core
#'
#' @title Compute the beta diversity between all sites
#'
#' @description
#' Compute the beta diversity between all sites for a specific presence-absence
#' matrix.
#'
#' @param mat_pa presence absence matrix (sites as rows and species as columns).
#'
#' @return
#' A dataframe with all the combinaisons of site and the counts.
#'
betadiversity_core <- function(mat_pa) {
    .Call('_ecoocc_betadiversity_core', PACKAGE = 'ecoocc', mat_pa)
}

#' @name cooccurrence_core
#'
#' @title Co-occurrence analysis.
#'
#' @description
#' Compute the co-occurrence of all pairs of species.
#'
#' @param mat_pa presence absence matrix (sites as rows and species as columns).
#'
#' @return
#' A dataframe with all the combinaisons of species and the counts associated.
#'
cooccurrence_core <- function(mat_pa) {
    .Call('_ecoocc_cooccurrence_core', PACKAGE = 'ecoocc', mat_pa)
}

cooc_zscore_binomial_core <- function(ab, ac, a, nsite) {
    .Call('_ecoocc_cooc_zscore_binomial_core', PACKAGE = 'ecoocc', ab, ac, a, nsite)
}

cooc_zscore_hypergeom_core <- function(ab, ac, a, nsite) {
    .Call('_ecoocc_cooc_zscore_hypergeom_core', PACKAGE = 'ecoocc', ab, ac, a, nsite)
}

cooc_mututal_information_core <- function(n1, n2, n11, n10, n01, n00, nsite) {
    .Call('_ecoocc_cooc_mututal_information_core', PACKAGE = 'ecoocc', n1, n2, n11, n10, n01, n00, nsite)
}

cooc_overlap_core <- function(n1, n2, n11) {
    .Call('_ecoocc_cooc_overlap_core', PACKAGE = 'ecoocc', n1, n2, n11)
}

#' @name cooccurrence_core
#'
#' @title Co-occurrence analysis for triplets.
#'
#' @return
#' A dataframe with all triplets of species and the counts associated.
#'
cooccurrence_triplet_core <- function(mat_pa) {
    .Call('_ecoocc_cooccurrence_triplet_core', PACKAGE = 'ecoocc', mat_pa)
}

#' @name rarefaction_core
#'
#' @title Compute rarefaction
#'
#' @description
#' Compute the rarefaction curve for a given presence-absence matrix. 
#'
#'
#' @param mat_pa presence absence matrix (sites as rows and species as columns).
#' @param nrep an integer specifying the number of repetition.
#'
NULL

rarefaction_core <- function(mat_pa, nrep) {
    .Call('_ecoocc_rarefaction_core', PACKAGE = 'ecoocc', mat_pa, nrep)
}

#' @name temporal_beta_core
#'
#' @title Compute the beta diversity two set of sites
#'
#' @description
#' Compute the beta diversity between all sites for a specific presence-absence
#' matrix.
#'
#' @param mat_pa1 presence absence matrix (sites as rows and species as columns) for time 1.
#' @param mat_pa2 presence absence matrix for time 2.
#'
#' @return
#' A dataframe with all the combinaison of sites and the counts associated.
#'
temporal_beta_core <- function(mat_pa1, mat_pa2) {
    .Call('_ecoocc_temporal_beta_core', PACKAGE = 'ecoocc', mat_pa1, mat_pa2)
}
KevCaz/ecoocc documentation built on Aug. 7, 2021, 8:22 p.m.