Skip to contents

Computes intraspecific pairwise distances between coral colony centroids and derives edge-to-edge and maximum distances. Results are returned as sf LINESTRINGs connecting colony centroids.

Usage

calculate_intraspecific_allee_dist(subset, label, ...)

Arguments

subset

An sf object with polygon geometries, and columns species, id, and width (diameter in cm).

label

A character label (e.g. "bleached", "unbleached") to annotate each line.

Value

An sf object of LINESTRINGs with columns:

species

Species name.

id_from

ID of origin colony.

id_to

ID of target colony.

centroid_distance

Distance between colony centroids (in CRS units).

colony_distance

Edge-to-edge distance (centroid distance minus radii).

max_distance

Maximum distance including both radii.

status

Label passed to label argument.

Examples

if (FALSE) { # \dontrun{
calculate_intraspecific_allee_dist(coral_sf, label = "unbleached")
} # }