std_distance: Calculate standard distance

View source: R/point-pattern_std-distance.R

std_distanceR Documentation

Calculate standard distance

Description

The standard distance of a point pattern is a measure of central tendency. Standard distance measures distance away from the mean center of the point pattern similar to standard deviations.

Usage

std_distance(geometry)

Arguments

geometry

an sfc object. If a polygon, uses sf::st_point_on_surface().

Value

A numeric scalar.

See Also

Other point-pattern: center_mean()

Examples

# Make a grid to sample from
grd <- sf::st_make_grid(n = c(1, 1), cellsize = c(100, 100), offset = c(0,0))

# sample 100 points
pnts <- sf::st_sample(grd, 100)

# plot points
plot(pnts)

# calculate standard distance
std_distance(pnts)

sfdep documentation built on Sept. 13, 2024, 5:07 p.m.