Description Usage Arguments Examples
This goes through every point in sf_obj and sums the distances between each consecutive point. If parameter max is FALSE sf_obj should be a point feature. If max = TRUE, sf_obj should be a polygon and it will return the diagonal distance of the field.
1 | calc_distance(sf_obj, max = FALSE)
|
sf_obj |
object of class 'sf' |
max |
conditional variable - default = FALSE |
1 2 3 4 5 6 | #Default
points = sf::read_sf('./data/Points.gpkg')
DIFMR::calc_distance(points)
#max = TRUE
field = DIFMR::fields[4,]
DIFMR::calc_distance(field, max = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.