| Title: | Conservation Indicators Using Spatial Information |
| Version: | 2.0.0 |
| Description: | Supports the assessment of the degree of conservation of taxa in conservation systems, both in ex situ (in genebanks, botanical gardens, and other repositories), and in situ (in protected natural areas). Methods are described in Carver et al. (2021) <doi:10.1111/ecog.05430>, building on Khoury et al. (2020) <doi:10.1073/pnas.2007029117>, Khoury et al. (2019) <doi:10.1016/j.ecolind.2018.11.016>, Khoury et al. (2019) <doi:10.1111/DDI.13008>, Castaneda-Alvarez et al. (2016) <doi:10.1038/nplants.2016.22>, and Ramirez-Villegas et al. (2010) <doi:10.1371/journal.pone.0013497>. |
| URL: | https://github.com/CIAT-DAPA/GapAnalysis |
| BugReports: | https://github.com/CIAT-DAPA/GapAnalysis/issues |
| Depends: | R (≥ 4.3.0) |
| Imports: | dataverse, dplyr, leaflet, terra |
| License: | GPL-3 |
| LazyData: | true |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| Suggests: | sf, knitr, rmarkdown, devtools, remotes, tidyr, stringr, openxlsx, ggplot2, ggtext, cowplot, htmltools, htmlwidgets, kableExtra |
| VignetteBuilder: | knitr |
| NeedsCompilation: | no |
| Packaged: | 2026-04-03 14:21:31 UTC; dan |
| Author: | Dan Carver |
| Maintainer: | Dan Carver <carver.dan1@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-04-09 15:30:02 UTC |
Cucurbita occurrences dataset
Description
This dataset is a subset of the original dataset for: C. cordata, C. digitata and C. palmata used in Khoury et al. (2019)
Usage
CucurbitaData
Format
A data frame with 1203 rows and 4 variables:
- species
character: Species name
- latitude
numeric:Latitude in decimal format
- longitude
numeric: Longitude in decimal format
- type
character: Source of the record,germplasm (G) or herbarium (H)
Source
References
Khoury et al. (2019) Plants, People, Planet 2(3):269-283. doi: 10.1002/ppp3.10085.
Cucurbita species distribution models dataset
Description
This dataset is a subset of species distribution models for: C. cordata, C. digitata and C. palmata used in Khoury et al., 2020
Usage
CucurbitaRasts
Format
terra rast object stored as a PackedSpatRaster
Source
References
Khoury et al. (2019) Diversity and Distributions 26(2):209-225. doi: 10.1111/DDI.1300
Ecological representativeness score ex situ
Description
The ERSex process provides an ecological measurement of the proportion of a species range that can be considered to be conserved in ex situ repositories. The ERSex calculates the proportion of terrestrial ecoregions (The Nature Conservancy Geospatial Conservation Atlas 2019) represented within the G buffered areas out of the total number of ecoregions occupied by the distribution model.
Usage
ERSex(taxon, sdm, occurrenceData, gBuffer, ecoregions, idColumn)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
sdm |
a terra rast object that represented the expected distribution of the species |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
gBuffer |
A terra vect which encompases a specific buffer distance around all G points |
ecoregions |
A terra vect object the contains spatial information on all ecoregions of interests |
idColumn |
A character vector that notes what column within the ecoregions object should be used as a unique ID |
Value
A list object containing 1. results : a data frames of values summarizing the results of the function 2. ecogaps : a terra vect object showing the ecoregions with no area within the g buffer objects 3. map : a leaflet object showing the spatial results of the function
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining occurrences from example
data(CucurbitaData)
##Obtaining Raster_list
data(CucurbitaRasts)
## ecoregion features
data(ecoregions)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
sdm <- terra::unwrap(CucurbitaRasts)$cordata
ecoregions <- terra::vect(ecoregions)
#Running generateGBuffers
gBuffer <- generateGBuffers(taxon = taxon,
occurrenceData = CucurbitaData,
bufferDistM = 50000
)
#Running ERSex
ers_exsitu <- ERSex(taxon = taxon,
sdm = sdm,
occurrenceData = CucurbitaData,
gBuffer = gBuffer,
ecoregions = ecoregions,
idColumn = "ECO_NAME"
)
Ecological representativeness score in situ
Description
The ERSin process provides an ecological measurement of the proportion of a species range that can be considered to be conserved in protected areas. The ERSin calculates the proportion of ecoregions encompassed within the range of the taxon located inside protected areas to the ecoregions encompassed within the total area of the distribution model, considering comprehensive conservation to have been accomplished only when every ecoregion potentially inhabited by a species is included within the distribution of the species located within a protected area.
Usage
ERSin(taxon, sdm, occurrenceData, protectedAreas, ecoregions, idColumn)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
sdm |
a terra rast object that represented the expected distribution of the species |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
protectedAreas |
A terra rast object the contian spatial location of protected areas. |
ecoregions |
A terra vect object the contains spatial information on all ecoregions of interests |
idColumn |
A character vector that notes what column within the ecoregions object should be used as a unique ID |
Value
A list object containing 1. results : a data frames of values summarizing the results of the function 2. missingEcos : a terra vect object showing all the ecoregions within the distribution with no protected areas present 3. map : a leaflet object showing the spatial results of the function
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining occurrences from example
data(CucurbitaData)
##Obtaining Raster_list
data(CucurbitaRasts)
##Obtaining protected areas raster
data(ProtectedAreas)
## ecoregion features
data(ecoregions)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
sdm <- terra::unwrap(CucurbitaRasts)$cordata
protectedAreas <- terra::unwrap(ProtectedAreas)
ecoregions <- terra::vect(ecoregions)
#Running ERSin
ers_insitu <- ERSin(taxon = taxon,
sdm = sdm,
occurrenceData = CucurbitaData,
protectedAreas = protectedAreas,
ecoregions = ecoregions,
idColumn = "ECO_NAME"
)
Final Conservation Score measure
Description
Compiles all tabular data from the individual metrics and generate the final results
Usage
FCSc_mean(taxon, fcsin, fcsex)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
fcsin |
A data frame containing summary results from the fcsin function |
fcsex |
A data frame containing summary results from the fcsex function |
Value
data_comb : a data frame which aggreates final result summaries
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining occurrences from example
data(CucurbitaData)
##Obtaining Raster_list
data(CucurbitaRasts)
##Obtaining protected areas raster
data(ProtectedAreas)
## ecoregion features
data(ecoregions)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
sdm <- terra::unwrap(CucurbitaRasts)$cordata
occurrenceData <- CucurbitaData
protectedAreas <- terra::unwrap(ProtectedAreas)
ecoregions <- terra::vect(ecoregions)
# generate exsitu conservation summaries
srs_exsitu <- SRSex(taxon = taxon,
occurrenceData = CucurbitaData
)
gBuffer <- generateGBuffers(taxon = taxon,
occurrenceData = occurrenceData,
bufferDistM = 50000
)#'
grs_exsitu <- GRSex(taxon = taxon,
sdm = sdm,
gBuffer = gBuffer
)
ers_exsitu <- ERSex(taxon = taxon,
sdm = sdm,
occurrenceData = occurrenceData,
gBuffer = gBuffer,
ecoregions = ecoregions,
idColumn = "ECO_NAME"
)
#Running fcsex
fcs_exsitu <- FCSex(taxon = taxon,
srsex = srs_exsitu,
grsex = grs_exsitu,
ersex = ers_exsitu
)
# generate insitu conservation summaries
srs_insitu <- SRSin(taxon = taxon,
sdm = sdm,
occurrenceData = CucurbitaData,
protectedAreas = protectedAreas
)
grs_insitu <- GRSin(taxon = taxon,
sdm = sdm,
protectedAreas = protectedAreas
)
ers_insitu <- ERSin(taxon = taxon,
sdm = sdm,
occurrenceData = occurrenceData,
protectedAreas = protectedAreas,
ecoregions = ecoregions,
idColumn = "ECO_NAME"
)
#Running fcsin
fcs_insitu <- FCSin(taxon = taxon,
srsin = srs_insitu,
grsin = grs_insitu,
ersin = ers_insitu
)
fsc_combine <- FCSc_mean(taxon = taxon,
fcsin = fcs_insitu,
fcsex = fcs_exsitu)
Final conservation score ex situ
Description
This function calculates the average of the three ex situ conservation metrics returning a final conservation score summary table. It also assigns conservation priority categories
Usage
FCSex(taxon, srsex, grsex, ersex)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
srsex |
A dataframe contain the results from the srsex function |
grsex |
A dataframe contain the results from the grsex function |
ersex |
A dataframe contain the results from the ersex function |
Value
out_df : a data frames of values summarizing the results of the function
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining occurrences from example
data(CucurbitaData)
##Obtaining Raster_list
data(CucurbitaRasts)
##Obtaining protected areas raster
data(ProtectedAreas)
## ecoregion features
data(ecoregions)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
sdm <- terra::unwrap(CucurbitaRasts)$cordata
occurrenceData <- CucurbitaData
protectedAreas <- terra::unwrap(ProtectedAreas)
ecoregions <- terra::unwrap(ecoregions)
# generate exsitu conservation summaries
srs_exsitu <- SRSex(taxon = taxon,
occurrenceData = CucurbitaData
)
gBuffer <- generateGBuffers(taxon = taxon,
occurrenceData = occurrenceData,
bufferDistM = 50000
)#'
grs_exsitu <- GRSex(taxon = taxon,
sdm = sdm,
gBuffer = gBuffer
)
ers_exsitu <- ERSex(taxon = taxon,
sdm = sdm,
occurrenceData = occurrenceData,
gBuffer = gBuffer,
ecoregions = ecoregions,
idColumn = "ECO_NAME"
)
#Running fcsex
fcs_exsitu <- FCSex(taxon = taxon,
srsex = srs_exsitu,
grsex = grs_exsitu,
ersex = ers_exsitu)
Final conservation score in situ
Description
This function calculates the average of the three in situ conservation metrics and assigns a priority category based on the results
Usage
FCSin(taxon, srsin, grsin, ersin)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
srsin |
A dataframe contain the results from the srsin function |
grsin |
A dataframe contain the results from the grsin function |
ersin |
A dataframe contain the results from the ersin function |
Value
out_df : a data frames of values summarizing the results of the function
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining occurrences from example
data(CucurbitaData)
##Obtaining Raster_list
data(CucurbitaRasts)
##Obtaining protected areas raster
data(ProtectedAreas)
## ecoregion features
data(ecoregions)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
sdm <- terra::unwrap(CucurbitaRasts)$cordata
occurrenceData <- CucurbitaData
protectedAreas <- terra::unwrap(ProtectedAreas)
ecoregions <- terra::vect(ecoregions)
# generate insitu conservation summaries
srs_insitu <- SRSin(taxon = taxon,
sdm = sdm,
occurrenceData = occurrenceData,
protectedAreas = protectedAreas
)
grs_insitu <- GRSin(taxon = taxon,
sdm = sdm,
protectedAreas = protectedAreas
)
ers_insitu <- ERSin(taxon = taxon,
sdm = sdm,
occurrenceData = occurrenceData,
protectedAreas = protectedAreas,
ecoregions = ecoregions,
idColumn = "ECO_NAME"
)
#Running fcsin
FCSin <- FCSin(taxon = taxon,
srsin = srs_insitu,
grsin = grs_insitu,
ersin = ers_insitu
)
Geographical representativeness score ex situ
Description
The GRSex process provides a geographic measurement of the proportion of a species’ range that can be considered to be conserved in ex situ repositories. The GRSex uses buffers (default 50 km radius) created around each G coordinate point to estimate geographic areas already well collected within the distribution models of each taxon, and then calculates the proportion of the distribution model covered by these buffers.
Usage
GRSex(taxon, sdm, gBuffer)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
sdm |
a terra rast object that represented the expected distribution of the species |
gBuffer |
A terra vect which encompases a specific buffer distance around all G points |
Value
A list object containing 1. results : a data frames of values summarizing the results of the function 2. gGaps : a terra vect object showing buffered area about g points 3. map : a leaflet object showing the spatial results of the function
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining occurrences from example
data(CucurbitaData)
##Obtaining Raster_list
data(CucurbitaRasts)
##Obtaining protected areas raster
data(ProtectedAreas)
## ecoregion features
data(ecoregions)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
sdm <- terra::unwrap(CucurbitaRasts)$cordata
occurrenceData <- CucurbitaData
# generate the g buffer object
gBuffer <- generateGBuffers(taxon = taxon,
occurrenceData = occurrenceData,
bufferDistM = 50000)
#Running GRSex
grs_exsitu <- GRSex(taxon = taxon,
sdm = sdm,
gBuffer = gBuffer
)
Geographical representativeness score in situ
Description
The GRSin process provides a geographic measurement of the proportion of a species’ range that can be considered to be conserved in protected areas. The GRSin compares the area of the distribution model located within protected areas versus the total area of the model, considering comprehensive conservation to have been accomplished only when the entire distribution occurs within protected areas.
Usage
GRSin(taxon, sdm, protectedAreas)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
sdm |
a terra rast object that represented the expected distribution of the species |
protectedAreas |
A terra rast object the contian spatial location of protected areas. |
Value
A list object containing 1. results : a data frames of values summarizing the results of the function 2. protectAreaMask : a terra rast object showing all the protected areas within the distribution 3. map : a leaflet object showing the spatial results of the function
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining Raster_list
data(CucurbitaRasts)
##Obtaining protected areas raster
data(ProtectedAreas)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
sdm <- terra::unwrap(CucurbitaRasts)$cordata
protectedAreas <- terra::unwrap(ProtectedAreas)
#Running GRSin
grs_insitu <- GRSin(taxon = taxon,
sdm = sdm,
protectedAreas = protectedAreas
)
Protected areas dataset in raster format
Description
This dataset is a raster version of the world protected areas dataset used in Khoury et al., (2019)
Usage
ProtectedAreas
Format
terra rast object
Source
https://www.protectedplanet.net/en
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016
Sampling representativeness score ex situ
Description
The SRSex process provides a general indication of the completeness of ex situ conservation collections, calculating the ratio of germplasm accessions (G) available in ex situ repositories to reference (H) records for each taxon, making use of all compiled records, regardless of whether they include coordinates, with an ideal (i.e., comprehensive) conservation ratio of 1:1. In this and in the subsequent measurements, if no G or H records exist, taxa are automatically considered to be of high priority for further conservation action and assigned a value of 0. If there are more G than H records, SRSex is set to 100.
Usage
SRSex(taxon, occurrenceData)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
Value
out_df : a data frames of values summarizing the results of the function
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining occurrences from example
data(CucurbitaData)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
#Running SRSex
srs_exsitu <- SRSex(taxon = taxon,
occurrenceData = CucurbitaData
)
Sampling representativeness score in situ
Description
The SRSin process calculates the proportion of all occurrences of a taxon falling within the distribution model that also fall within a protected area
Usage
SRSin(taxon, sdm, occurrenceData, protectedAreas)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
sdm |
a terra rast object that |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
protectedAreas |
A terra rast object the contian spatial location of protected areas. |
Value
A list object containing 1. results : a data frames of values summarizing the results of the function 2. points : a terra vect object showing all the points present within protected areas 3. map : a leaflet object showing the spatial results of the function
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining occurrences from example
data(CucurbitaData)
##Obtaining Raster_list
data(CucurbitaRasts)
##Obtaining protected areas raster
data(ProtectedAreas)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
sdm <- terra::unwrap(CucurbitaRasts)$cordata
occurrenceData <- CucurbitaData
protectedAreas <- terra::unwrap(ProtectedAreas)
#Running SRSin
srs_insitu <- SRSin(taxon = taxon,
sdm = sdm,
occurrenceData = occurrenceData,
protectedAreas = protectedAreas
)
Quality check of ecoregion dataset
Description
Checks the class, crs, if the idColumn is a unique ID,
Usage
checkEcoregion(ecoregion, sdm, idColumn)
Arguments
ecoregion |
A terra vect object the contains spatial information on all ecoregions of interests |
sdm |
a terra rast object that represented the expected distribution of the species |
idColumn |
A character vector that notes what column within the ecoregions object should be used as a unique ID |
Value
ecoregions : A terra vect object the contains spatial information on all ecoregions of interests
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining Raster_list
Quality check on occurrences data
Description
Checks the column names, column data types, valid lat lon, and can optionally remove any duplicated lat lon records per species. The cleaned and formated dataframe is returned as well as a map object show a quick reference of the points in space.
Usage
checkOccurrences(csv, taxon, removeDuplicated = FALSE)
Arguments
csv |
A dataframe holding the occurrence data |
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
removeDuplicated |
: Binary parameter. TRUE == duplication values are remove. Set to FALSE as default |
Value
A list object containing 1. data : a data frames of values of occurrence data in the required format 2. map : a leaflet object showing the spatial results of the function
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
# example code
##Obtaining occurrences from example
Quality check on protected areas dataset
Description
Checks the class, values, crs, and cell size of the protected areas raster to ensure these elements match those required by gap analysis functions.
Usage
checkProtectedAreas(protectedAreas, sdm)
Arguments
protectedAreas |
A terra rast object the contian spatial location of protected areas. |
sdm |
a terra rast object that represented the expected distribution of the species |
Value
protectedAreas : a terra rast object representing protected areas
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining Raster_list
Quality check on sdm imagery
Description
Evaluates the class, crs, and values are standardizes to what the following gap analysis functions are required.
Usage
checksdm(sdm)
Arguments
sdm |
a terra rast object that represented the expected distribution of the species |
Value
sdm : a terra rast object that is in the correct CRS
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining Raster_list
Ecoregions vector
Description
This dataset is a subset of the Terrestrial Ecoregions of the World shapefile was made available by the world wildlife foundation
Usage
ecoregions
Format
SpatVector
Source
Generate initial counts of the occurrence data
Description
Performs data cleaning to generate a summary of all input occurrence data. These values area used in the SRSex function.
Usage
generateCounts(taxon, occurrenceData)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
Value
countsData : a data frames of values summarizing the results of the function
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining occurrences from example
data(CucurbitaData)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
occurrenceData <- CucurbitaData
#Running generateCounts
counts <- generateCounts(taxon = taxon,
occurrenceData = occurrenceData
)
Select relivent ecoregions
Description
Utilizes the occurrence data location to select all ecoregions that intersect with thoses points. Helpful as it reduces the overall file size of the ecoregion object.
Usage
generateEcoSelection(taxon, occurrenceData, ecoregions, idColumn)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
ecoregions |
A terra vect object the contains spatial information on all ecoregions of interests |
idColumn |
A character vector that notes what column within the ecoregions object should be used as a unique ID |
Value
selectedEcos : a terra vect that contains the selected ecoregion features
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining occurrences from example
data(CucurbitaData)
## ecoregion features
data(ecoregions)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
occurrenceData <- CucurbitaData
ecoregions <- terra::vect(ecoregions)
#Running generateEcoSelection
selectedEcos <- generateEcoSelection(taxon = taxon,
occurrenceData = occurrenceData,
ecoregions = ecoregions,
idColumn = "ECO_NAME"
)
Generate buffer of G type occurrences
Description
Produces a terra vect object representing the area around the G type occurrences
Usage
generateGBuffers(taxon, occurrenceData, bufferDistM)
Arguments
taxon |
A character object that defines the name of the species as listed in the occurrence dataset |
occurrenceData |
a data frame of values containing columns for the taxon, latitude, longitude, and type |
bufferDistM |
Distance in meters. Used to set the size of the buffered objects. |
Value
A list object containing 1. data : a terra vect object showing all the buffered areas around the G type occurrences 2. map : a leaflet object showing the spatial results of the function
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information
Examples
##Obtaining occurrences from example
data(CucurbitaData)
# convert the dataset for function
taxon <- "Cucurbita_cordata"
occurrenceData <- CucurbitaData
#Running generateGBuffers
gBuffer <- generateGBuffers(taxon = taxon,
occurrenceData = occurrenceData,
bufferDistM = 50000
)
Download datasets from the harvard dataverse repo
Description
Ecoregions and protected area data base are stored on a harvard dataverse repository. This functions check to see if those datasets have been download and will download them if not present.
Usage
getDatasets()
Value
A message confirming the datasets were downloaded, along with saving the files to the package's data directory.
References
Khoury et al. (2019) Ecological Indicators 98:420-429. doi: 10.1016/j.ecolind.2018.11.016 Carver et al. (2021) GapAnalysis: an R package to calculate conservation indicators using spatial information