general_functions {segmetric}R Documentation

General functions

Description

These functions manipulate segmetric objects.

Usage

sm_area(s, order = NULL)

sm_centroid(s, order = NULL)

sm_distance(s1, s2)

sm_intersection(s1, s2, touches = TRUE)

sm_subset_union(s)

sm_rbind(...)

sm_apply_group(x, groups, fn, ...)

sm_summarize_group(x, groups, fn, ...)

sm_norm_left(x, y)

sm_norm_right(x, y)

sm_options(..., digits = NULL)

Arguments

s, s1, s2

Either a ref_sf, a seg_sf, or a subset_sf object (inherited from sf).

order

A subset_sf. This argument arranges the returned values according to the object passed here.

touches

A logical. Is the border part of the intersection?

...

For sm_rbind(), a set of subset_sf objects to be merged.

x, y

A numeric values (e.g. areas, lengths) to compute metrics.

groups

A group identifier vector used to aggregate a metric for each group.

fn

A function to aggregate a metric for a group.

digits

An integer indicating how many digits used to round metric values.

Value


[Package segmetric version 0.3.0 Index]