Learn R Programming

geoCount (version 1.150120)

loc2U_R: Calculate the Distance Matrix among Given Locations

Description

This function calculates the distance matrix among the given locations.

Usage

loc2U_R(loc)

Arguments

loc
a matrix of $n \times 2$ which indicates the x-y coordinates of the original locations

Value

A $n \times n$ matrix with the element $e_{ij}$ indicating the distance between the ith and jth locations.

Details

This function performs the computation in R.

See Also

loc2U, locCircle, locGrid, locSquad.

Examples

Run this code
## Not run: 
#   loc <- locGrid(1, 2, 10, 5)
#   U <- loc2U_R(loc)
# ## End(Not run)

Run the code above in your browser using DataLab