Learn R Programming

aspace (version 3.2)

distances: Multiple Euclidean distance calculator

Description

Compute distances from a source location (point) to a series of destination locations (points).

Usage

distances(centre.xy = centre, destmat = activities, 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

Value

Details

Distance computations are strictly Euclidean between the source point and each destination point.

Examples

Run this code
  data(centre)
  data(activities)
  distances(centre.xy=centre, destmat=activities, verbose=FALSE)  

Run the code above in your browser using DataLab