Description Usage Arguments Details Value Note Author(s) Examples

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

1 | ```
distances(centre.xy = centre, destmat = activities, verbose = FALSE)
``` |

`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 |

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

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.

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.

Tarmo K. Remmel

1 2 3 | ```
data(centre)
data(activities)
distances(centre.xy=centre, destmat=activities, verbose=FALSE)
``` |

```
Loading required package: splancs
Loading required package: sp
Spatial Point Pattern Analysis Code in S-Plus
Version 2 - Spatial and Space-Time analysis
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Attaching package: 'Hmisc'
The following object is masked from 'package:splancs':
zoom
The following objects are masked from 'package:base':
format.pval, round.POSIXt, trunc.POSIXt, units
Loading required package: shapefiles
Loading required package: foreign
Attaching package: 'shapefiles'
The following objects are masked from 'package:foreign':
read.dbf, write.dbf
[1] 28499.02 16621.36 12813.67 31829.45 18018.87 15912.03 13338.89 13004.51
[9] 24571.60 14902.33
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.