direct {simba}R Documentation

Obtain Direction Classes from Geographic Coordinates

Description

The functions calculates direction classes from geographic coordinates (not lat/lon). All possible connections between these points are established and the direction of each link is calculated. This is followed by a designation of direction-classes.

Usage

direct(coord, listout=FALSE)

direct2(coord, listout=FALSE)

Arguments

coord A data.frame containing coordinates. Should have the same number of points as the data for which the direction-classes are calculated.
listout Logical value, indicating whether the result is given back in (data.frame)-format instead of returning a dist-object.

Value

Returns a matrix containing the direction-classes of the connections between the coordinates as a dist-object. If listout = TRUE, the result is given as a list (data.frame).
direct returns 4 directions (North-South, Northwest-Southeast, West-East, Northeast-Southwest).
direct2 returns 6 directions.

Note

as with mantel it takes a while to calculate

Author(s)

Gerald Jurasinski

See Also

mantel, cor.test

Examples

data(abis)
dirclass <- direct(abis.env[,1:2])
dirclass
dirclass.ls <- direct(abis.env[,1:2], listout=TRUE)
dirclass.ls

[Package simba version 0.2-5 Index]