lets.distmat: Compute a geographic distance matrix

Description Usage Arguments Details Value Author(s) Examples

Description

Calculates a geographic distance matrix based on a PresenceAbsence or a two column matrix of x(longitude) and y(latitude).

Usage

1
lets.distmat(xy, asdist = TRUE, ...)

Arguments

xy

A PresenceAbsence object or a matrix with two columns (longitude, latitude).

asdist

Logical, if TRUE the result will be an object of class dist, if FALSE the result will be an object of class matrix.

...

Arguments to be passed to the function rdist.earth of package fields.

Details

This function basically facilitates the use of rdist.earth on a PresenceAbsence object, allowing also the user to have directly a dist object.

Value

The user can choose between dist and matrix class object to be returned. The resulting values are in kilometers (but see the argument 'miles' in rdist.earth).

Author(s)

Bruno Vilela & Fabricio Villalobos

Examples

1
2
3
4
5
## Not run: 
data(PAM)
distPAM <- lets.distmat(PAM)   

## End(Not run)


Search within the letsR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.