View source: R/grid_matching.R
grid_matching | R Documentation |
This function calculate nearest distance between a set of occurrences and a set of grid systems.
grid_matching(
input_occ,
input_grid = NULL,
country = NULL,
grid_metadata = NULL,
flag_relativeTHD = NULL,
flag_rm_Large_outlier = FALSE,
flag_absoluteTHD = NULL
)
input_occ |
Input occurrences (shapefile or .txt/.csv data with decimalLongitude & decimalLatitude). |
input_grid |
A list of spatial polygons, each represent one grid system. |
country |
Character vector. A string or a vector of strings of countries names; can be used to subset known grid systems (G sheet, or a dataframe from user, in which case it should have a similar structure as G sheet). |
grid_metadata |
A dataframe, if null, G sheet is loaded; otherwise, user should provide a table that looks like G sheet. |
flag_relativeTHD |
Numerical. 0.1 if a relative distance is >0.1 or 10% of max distance (half of the diagonal line), then make it NA (meaning not from a grid). |
flag_rm_Large_outlier |
Give a pool of distances, then remove outliers (based on R boxplot algorithm). |
flag_absoluteTHD |
Numerical. An absolute distance, beyond of which an occurrence is excluded. |
gridID |
Character vector. A string or a vector of strings; grid ID to be used in the calculation (gridID from G sheet or user provied dataframe). |
Xiao Feng
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.