| direct {simba} | R Documentation |
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.
direct(coord, listout=FALSE) direct2(coord, listout=FALSE)
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. |
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.
as with mantel it takes a while to calculate
Gerald Jurasinski
data(abis) dirclass <- direct(abis.env[,1:2]) dirclass dirclass.ls <- direct(abis.env[,1:2], listout=TRUE) dirclass.ls