Package 'RecruitNetP'

Title: Analysis of Recruitment Networks
Description: Analyze recruitment networks and patterns of plant-plant interactions.
Authors: Alicia Montesinos-Navarro [aut, cph] (0000), José Luis Garrido [aut, cph] (0000), Miguel Verdú [aut, cph] (0000), Julio M. Alcántara [aut, cph] (0000), Francisco Rodriguez-Sanchez [aut, cre, cph]
Maintainer: Francisco Rodriguez-Sanchez <[email protected]>
License: GPL (>= 3)
Version: 0.0.0.9000
Built: 2024-08-21 05:46:59 UTC
Source: https://github.com/EcologyR/RecruitNetP

Help Index


Calculate interaction strength indices

Description

Calculate interaction strength indices

Usage

associndex(
  int_data = NULL,
  cover_data = NULL,
  area_sampled = NULL,
  thr_dens = 100
)

Arguments

int_data

data frame with at least four columns:

  • Study_site (unique name of the study site),

  • Recruit (species of the recruit),

  • Canopy (species of the canopy, or "Open"), and

  • Frequency (number of recruits of that species observed under that canopy species in any plot, with "Open" representing recruits observed without a canopy species). If available, the dimensions of the study plots can be also included as variables PlotdimX and PlotdimY.

cover_data

data frame with at least five columns:

  • Study_site (unique name of the study site),

  • Plot (unique name of each plot within a study site),

  • Canopy (species of the canopy),

  • Cover (percentage of cover of that species in that plot), and

  • Sampled_distance_or_area (total area of the plot).

area_sampled

Total area surveyed in the study site (in m2).

thr_dens

Maximum density considered as reasonable. For example, if a canopy species is rare (e.g. 0.01 m2) but there is one sapling growing beneath, we would estimate a density of 100 saplings/m2 for this interaction, what is likely an overestimate because it seems reasonable that increasing the effort under this canopy species we would obtain a much lower density estimate. The threshold is set by default to 100 recruits/m2.

Value

data frame with indices of pair-wise interaction strength and the data neeeded for their estimation. Each row corresponds to each pair-wise interaction, and contains the following columns: Recruit: recruit species. Canopy: canopy species. inter_ID: a unique identifier for each pair-wise interaction, combining Study_site, Recruit, and Canopy species. Study_site: name of the study site. Canopy_Freq: number of recruits found in the vicinity of the canopy species. Open_Freq: number of recruits found in open spaces. Canopy_cover: percentage of the total area sampled in the study site occupied by the canopy species. Open_cover: percentage of the total area sampled in the study site occupied by Open spaces. Freq_tot: sum of Canopy_Freq and Open_Freq (total number of recruits of the recruit species in the area sampled in the study site. RecrDens_canopy: density of recruits under the canopy species (recruits/m2). RecrDens_open: density of recruits in open spaces (recruits/m2). Max_Recr_Density: maximum recruitment density between under the canopy species vs in open spaces. max_Recr: maximum recruitment density of the recruit species in the study site. Ns: Normalized Neighbour Suitability index (Mingo, 2014). NintC: commutative symmetry intensity index (Díaz-Sierra et al., 2017) NintA:additive symmetry intensity index (Díaz-Sierra et al., 2017) RII: Relative Interaction Index (Armas et al., 2004).

Examples

data(RecruitNet)
data(CanopyCover)
int_data <- comm_subset(RecruitNet, site = "Ventisquero")
cover_data <- CanopyCover[CanopyCover$Study_site == "Ventisquero", ]
Ventisquero_int <- associndex(int_data, cover_data)

CanopyCover

Description

Canopy cover of plant-plant interactions global database

Usage

CanopyCover

Format

An object of class data.frame with 26812 rows and 7 columns.

Source

https://doi.org/10.1002/ecy.3923


Subset sites

Description

This function extracts the information of a given local community and stores it in a separate data frame. It can also extract more than one site.

Usage

comm_subset(dataset = NULL, site = NULL)

Arguments

dataset

A data frame containing recruitment data.

site

character. Name of a study site within the dataset or a character vector with the names of several study sites.

Value

A data frame containing all the data from the desired community/ies

Examples

data(RecruitNet)

Ventisquero <- comm_subset(RecruitNet, site = "Ventisquero")

TwoSites <- comm_subset(RecruitNet, c("Ventisquero","Agadir"))

Summarise metadata of a community

Description

This function provides a summary of the characteristics (i.e. metadata) of a local community.

Usage

comm_summary(dataset = NULL)

Arguments

dataset

A data frame for a single site (or a group of sites). For example, a data frame created with comm_subset(). This function relies on the variable names used in the original RecruitNet database, so it cannot be used with other datasets unless they follow exactly the ordering and the names used in RecruitNet.

Value

A data frame with summary information of the local community/ies.

Examples

All_sites_details <- comm_summary(RecruitNet)
Ventisquero <- comm_subset(RecruitNet, site = "Ventisquero")
Ventisquero_details <- comm_summary(Ventisquero)

Merge cover data with interaction data for a given site

Description

This function returns a data frame that merges the information from the recruitment network and species cover for a local community. It is a shortcut to directly obtain the data for a local community from the RecruitNet dataset.

Usage

comm_to_RN(RN_data = NULL, cover_data = NULL, site = NULL)

Arguments

RN_data

data set where recruitment networks are stored. Usually, it will be "RecruitNet" (or the name assigned to the dataset when it was imported).

cover_data

data set where cover data is stored. Usually, it will be "CanopyCover" (or the name assigned to the dataset "CanopyCover.csv" when it was imported).

site

name of the study site.

Value

A data.frame containing 7 columns with all the information needed for the basic analysis of recruitment networks and canopy-recruit interactions: canopy species (Canopy), recruit species (Recruit), recruitment frequency (fij), Tij = TODO, Pij = TODO, cover of the canopy (cj) and cover of the recruit (ci).

Examples

data(RecruitNet)
data(CanopyCover)
Ventisquero_RNc <- comm_to_RN(RecruitNet, CanopyCover, site = "Ventisquero")

Download RecruitNet database

Description

Download latest version of the RecruitNet database (Verdú et al. 2023, doi:10.1002/ecy.3923).

Usage

download_RN(path = getwd(), destfile = "RN.zip", unzip = TRUE)

Arguments

path

character. Path to folder where the RecruitNet database should be saved.

destfile

character. Name of the zip file to be saved.

unzip

Logical. Uncompress the zip file? Default is TRUE.

Value

A zip file or two CSV files, depending if unzip is TRUE.

Examples

download_RN()

Functional topology of a recruitment network.

Description

Alcantara & Rey (2012) derived a qualitative way to infer potential species persistence from their position in the RNs based on a combination of non-negative matrix theory and graph theory. Basically, directed unipartite graphs can be unambiguously dissected into 'SCCs'. SCCs are the largest possible subgroups of nodes connected so that all the nodes in a subgroup can be reached from all others following the directions of the links. In the case of RNs, we can define five types of SCCs which play different functional roles:

  • The "core" of the network is the SCC formed by the largest number of species. All species in the core must recruit, at least, in the vicinity of another core species, and allow the recruitment of at least another core species.

  • “Satellites” are non-core species that can be reached from some core species, following the direction of the arrows. For example, a satellite species is one that recruits in the vicinity of some core species but that does not show recruitment of any species in its vicinity.

  • "Disturbance-dependent transients" are species that can be reached from the open node but not from core or satellite species (i.e. for example, species that only recruit away from established plants).

  • "Strict transients" are species that cannot be reached from any other node (i.e. those that do not recruit in the studied local assemblage).

Assuming that the dynamics of the system is linear and time-invariant (LTI dynamics), like in Markov models (Horn, 1975, Siles et al., 2008), only core and satellite species will persist in equilibrium in the absence of disturbance. When the dynamics are non-linear, this result cannot be guaranteed to hold, but simulations have shown that the probability of persistence is higher and the time to extinction is longer for core and satellite than for transient species (Alcantara et al., 2017). The sum of core and satellite species is a qualitative approximation to the number of species that can potentially persist.

Usage

funtopol(int_data)

Arguments

int_data

Data frame with columns named "Canopy" and "Recruit" identifying observed interactions (i.e. interactions with frequency > 0).

Value

The function returns two outputs: a data frame with the numeric summary of the functional structure and a list containing the lists of species of each functional type (core, satellite, strict transients and disturbance-dependent transients).

Examples

data(RecruitNet)
int_data <- comm_subset(RecruitNet, site = "Ventisquero")
Ventisquero_funtopol <- funtopol(int_data)
Ventisquero_funtopol$Descriptors
Ventisquero_funtopol$Functional_classification

RecruitNet

Description

Plant-plant interactions global database

Usage

RecruitNet

Format

An object of class data.frame with 135210 rows and 26 columns.

Source

https://doi.org/10.1002/ecy.3923


Function RN_matrixForm

Description

For some analyses, the data must be stored as a matrix rather than data frame. The next function takes a RN stored as data frame and transforms it into a matrix. The output matrix can be used input for bipartite package.

Usage

RN_to_matrix(RNdata = NULL, weight = NULL)

Arguments

RNdata

A data frame generated with comm_subset() or a data.frame containing columns with all the information needed for the basic analysis of recruitment networks: canopy species (canopy), recruit species (recruit), cover of the canopy (cj) and recruit (ci), and columns with possible weighting variables.

weight

The name of the column of the data frame to be used as weight variable for the links.

Value

A matrix object with the species names as row (recruit species) and column names (canopy species), and cells indicating the chosen weight for each interaction. For example, the output of function local_RN provides the number of recruits of species i interacting with canopy species j (fij), the number of plots (i.e. incidence) where the interaction has been found (Tij), and the binary presence/absence of the interaction in the whole study site (Pij). Can be used as bipartite input.

Examples

data(RecruitNet)
data(CanopyCover)
Ventisquero_RNc <- comm_to_RN(RecruitNet, CanopyCover, site = "Ventisquero")
Ventisquero_matrix <- RN_to_matrix(Ventisquero_RNc, weight = "fij")
Ventisquero_matrix <- RN_to_matrix(Ventisquero_RNc, weight = "Tij")

Association significance testing

Description

Generate a list with four elements, a data base with the significance tests of association of each interaction (in rows) and three matrices of interaction of positive, negative and neutral interactions, from a study site (for a single sites)

Usage

sign_net(inter_data, cover_data, site, type)

Arguments

inter_data

data frame with at least four columns: Study_site (unique name of the study site), Recruit (species of the recruit), Canopy (species of the canopy, or "Open"), and Frequency (number of recruits of that species observed under that canopy species in any plot, with "Open" representing recruits observed without a canopy species).

cover_data

data frame with at least five columns: Study_site (unique name of the study site), Plot (unique name of each plot within a study site), Canopy (species of the canopy), Cover (percentage of cover of that species in that plot), and Sampled_distance_or_area (total area of that plot or length in the case of transects).

site

is the name of the Study_site

type

is a character that identifies which hypothesis is being tested with three options:

  1. "by_pairwise_interaction": whether the number of recuits of each recruit species under each canopy species is significantly different from the number observed in the open, considering the percentage of cover of that canopy species and open area (i.e.bare ground), respectively.

  2. "by_recruit_sp": whether the number of recuits of each recruit species under any canopy species (all together) is significantly different from the number observed in the open, considering the percentage of cover of all canopy species together and open area (i.e.bare ground), respectively.

  3. "by_canopy_sp": whether the number of recuits of any recruit species (all together) under a given canopy species is significantly different from the number observed in the open, considering the percentage of cover of that canopy species and open area (i.e.bare ground), respectively

Value

a list with four elements. The first element data frame with the same structure as the input with three additional columns: int_p (p-value of the binomial test of association), int_sign (the sign of the association, being Posive (or Negative) if the association is stronger (or weaker) than expected by the percentage cover of Canopy and Open, and Neutral if there is not enought power to conduct the test, stdres (standarized resdual quantifying the difference between the observed and expected values), and testability (indicating whether the sample size allow to conduct or not the test being Non-testable those rows in which int_sign = Neutral). The second, third and fourth elements of teh list are the matrices of only positive, negative and neutral ( testable) associations based on the database generated in the first element of the list.

Examples

sign_vest <- sign_net(RecruitNet, CanopyCover, "Ventisquero", "by_pairwise_interaction" )