% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GRSin.R
\name{GRSin}
\alias{GRSin}
\title{Geographical representativeness score in situ}
\usage{
GRSin(taxon, sdm, protectedAreas)
}
\arguments{
\item{taxon}{A character object that defines the name of the species as listed in the occurrence dataset}

\item{sdm}{a terra rast object that represented the expected distribution of the species}

\item{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
}
\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.
}
\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
                    )



}
\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
}
