distances {aspace} | R Documentation |
Multiple Euclidean distance calculator
Description
Compute distances from a source location (point) to a series of destination locations (points).
Usage
distances(centre.xy = NULL, destmat = NULL, verbose = FALSE)
Arguments
centre.xy |
Two-element vector containing x,y coordinates of the source location |
destmat |
Two-column matrix or data frame containing x,y coordinates of the activity locations |
verbose |
Boolean: Set to T if verbose output is desired |
Details
Distance computations are strictly Euclidean between the source point and each destination point.
Value
A vector of distances, where each element corresponds to one of the distance between the source point and a destination (one row) from the destinations matrix.
Note
The order of distances in the output vector corresponds to the order of destination points in the destinations object starting at row = 1 through row = n.
Author(s)
Tarmo K. Remmel
Examples
data(centre)
data(activities)
distances(centre.xy=centre, destmat=activities, verbose=FALSE)
[Package aspace version 4.1.2 Index]