Learn R Programming

fieldRS (version 0.2.3)

ecDistance: ecDistance

Description

Calculates the Euclidean distance among all elements of a SpatialPoints object.

Usage

ecDistance(x)

Arguments

x

A matrix, data.frame or a SpatialPoints object.

Value

A matrix.

Details

compares all elements of x and returns the minimum Euclidean distance between them.

See Also

spCentroid

Examples

Run this code
# NOT RUN {
{

require(raster)

# read field data
data(fieldData)

# show distance matrix
head(ecDistance(fieldData))

}
# }

Run the code above in your browser using DataLab