geo.dist: Calculates geographic distances.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/geo.dist.R

Description

Internal function to prepare geographic distances for the combined analysis with genetic relatedness.

Usage

1
2
     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".

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).

Value

matrix.share

Object containing geographic distances.

Author(s)

Philipp Kraemer, <philipp.kraemer@uni-oldenburg.de>

See Also

Demerelate allele.sharing inputformat

Examples

1
2
3
4
     ## internal function not intended for direct use
    
     
     

Demerelate documentation built on May 2, 2019, 4:01 p.m.