thin_points | R Documentation |
The thin_points
function returns records based on coordinate thinning based on a minimum nearest neighbor distance approach.
thin_points(
df,
accepted.name = NA,
distance = 5,
reps = 100,
latitude = "latitude",
longitude = "longitude"
)
df |
Data frame of occurrence records. |
accepted.name |
Accepted name of your species. This argument is not required if the data frame already contains an accepted_name column. |
distance |
Default = 5. Distance in km to separate records. |
reps |
Default = 100. Number of times to perform thinning algorithm. |
latitude |
Default = "latitude". The name of the latitude column in the data frame. |
longitude |
Default = "longitude". The name of the longitude column in the data frame. |
This function is a wrapper for spatial thinning using the spThin package (Aiello-Lammens et al., 2015) In summary, the thinning algorithm provided by spThin calculates the pairwise distances between data points, then randomly samples a single point from all points less than or equal to the set minimum nearest neighbor distance. This process is repeated until the pairwise distances among points do not fall below the minimum nearest neighbor distance.
df is a data frame with the cleaned data.
Information about the columns in the returned data frame can be found in the documentation for gators_download()
.
thinned_data <- thin_points(data, accepted.name = "Galax urceolata")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.