Description Usage Arguments Value Examples
View source: R/define_accessibleArea.R
Determine accessible area for a SDM to be projected to in geographic space. This is done using either an alpha or convex hull approach, where the buffer to the hull is either 1) a user defined distance in meters, 2) a percentile distance between points, or 3) the maximum distance of either the user defined distance or the percentile distance between points.
1 2 3 4 5 6 7 8 9 10 11 | define_accessibleArea(
df,
lon = "decimalLongitude",
lat = "decimalLatitude",
species = "scientificName",
shape = "alpha",
minBuffDist,
quantile = 0.8,
dis_type = "max",
clipCoast = "terrestrial"
)
|
df |
a data.frame containing the coordinates (e.g., latitude and longitude) of a the occurrence records. |
lon |
a character string containing the column name with the longitudinal coordinates. Default = "decimalLongitude". |
lat |
a character string containing the column name with the latitudinal coordinates. Default = "decimalLatitude". |
species |
a character string containing the binomial of the species whose distribution is being modeled. Default = "scientificName". |
shape |
a character string of either "alpha" or "convex" determining if the polygon around the occurrence records should be an alpha or convex hull. Default = "alpha". |
quantile |
a double value between the range of 0 and 1 that represents the a quantile distance between points (e.g., the 0.8th quantile distance between occurrence records). Default = 0.8 |
dis_type |
character string of either "meters", "Q", or "max" denoting if the buffered distance should be a user defined value in meters ("meters"), a quantile determined distance between points ("Q), or the maximum value between the other two options ("max"). Default = "max". |
clipCoast |
Either "no" (no clipping), "terrestrial" to only keep terrestrial part of range or "aquatic" to only keep non-terrestrial part of range. Default = "terrestrial". |
minBuff |
a numeric value denoting the buffer in meters for the polygon around the occurrence points. |
a spatial polygon representing the accessible area for a species' distribution.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # generate test data.frame
test_data <- data.frame(species = "Test species",
decimallongitude = runif(100, min = 42, max = 51),
decimallatitude = runif(100, min = -26, max = -11))
# flag potentially problematic coordinates using CoordinateCleaner Function
# only keep non-flagged coordinates
cc <- dplyr::filter(CoordinateCleaner::clean_coordinates(x = test_data),
.summary == TRUE)
aa <- define_accessibleArea(df = cc,
lon = "decimallongitude", lat = "decimallatitude",
minBuffDist = 100000)
plot(aa)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.