Description Usage Arguments Value See Also Examples
This function groups spatial points based on the distance to the next point. If distance is smaller than a threshold, points are considered in the same group. Group number for points outside the threshold is NA. Depending on how many spatial points are in the data frame, runtime might be long.
1 |
df |
df a data frame object. |
coor |
longitude and latitude of the spatial points in the format of c("lon","lat"). |
threshold |
a distance threshold used to determine if points are in the same group. The format is numeric. Unit is meters. |
groupvar |
grouping object to stratify spatial points. Recommend to be ID for each individual.
If |
a list of numbers and NAs indicating whether a set of spatial points are in the same group or not in any groups.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.