dist_to_rm: Distance to a source of a raw material

View source: R/rm_distance.R

dist_to_rmR Documentation

Distance to a source of a raw material

Description

For simple feature geometries in projected coordinate reference system, euclidean distance (in km) is returned between features of from and to categorized by levels specified in rm.

Usage

dist_to_rm(from, to, rm, id = "id")

Arguments

from

sf object of geometry type POINTS in projected CRS (settlements).

to

sf object of geometry type POINT or LINESTRING in projected CRS (raw material locations). Each raw material can have multiple locations, same raw materials are identified by identical label in column specified by rm argument.

rm

Column name of to to use as a grouping variable (identical raw material).

id

Column name of from containing unique identifiers.

Value

A tibble containing min, max, mean and median distance for each raw material (level of rm column) to an observation specified in from (settlement) is returned.


petrpajdla/settlements documentation built on June 27, 2022, 10:21 p.m.