Learn R Programming

GapAnalysis (version 1.0.2)

OccurrenceCounts: Generating counts dataframe for taxa

Description

This function creates a summary file counting the total number of G and H occurrences, including those with coordinates

Usage

OccurrenceCounts(species, Occurrence_data)

Arguments

species

A vector of characters with the species name.

Occurrence_data

A data frame object with the species name, geographical coordinates, and type of records (G or H) for a given species

Value

This function returns a data frame object with the following columns:

species Species name totalRecords
Total number of records hasLat Number of occurrences with latitude
hasLon Number of occurrences with longitude totalUseful
Number of occurrences with coordinates totalGRecords Number of G occurrences
totalGUseful Number of G occurrences with coordinates totalHRecords
Number of H occurrences totalHUseful Number of H occurrences with coordinates

References

Ramirez-Villegas et al. (2010) PLOS ONE, 5(10), e13497. doi: 10.1371/journal.pone.0013497 Khoury et al. 2019) Ecological Indicators 98: 420-429. doi: 10.1016/j.ecolind.2018.11.016

Examples

Run this code
# NOT RUN {
data(CucurbitaData)
##Obtaining species names from the data
Cucurbita_splist <- unique(CucurbitaData$species)
sp_counts <- OccurrenceCounts(Cucurbita_splist[[1]],CucurbitaData)

# }

Run the code above in your browser using DataLab