Internal function to prepare geographic distances for the combined analysis with genetic relatedness.
Usage
geo.dist(pop1, pop2, onlypairs = FALSE, value)
Arguments
pop1
Specific type of dataframe as in inputformat. Population one used for calculations. Individuals passed to rows of resulting matrix. Inputformat should be standard with x and y coordinate mode for Demerelate.
pop2
Specific type of dataframe as in inputformat. Population two used for calculations. Individuals passed to columns of resulting matrix. Inputformat should be standard with x and y coordinate mode for Demerelate.
onlypairs
If set as TRUE geographic distances is calculated only for diagonal comparisons in matrix. If set as FALSE lower triangel is calculated.
value
String defining method to calculate geographic distances. Can be set as "relative" or "decimal".
Value
Details
Two different methods of distance calculations are implemented in Demerelate. If using "relative", distances will be calculated from x-y coordinates using normal pythagoratic mathematics. When working with geographic positions value needs to be set to "decimal". x and y coordinates need to be given as geographic positions in decimal degrees (demereldist).