dist_cavalli: Estimation of Bray-Curtis distance

Description Usage Arguments Value Author(s) Examples

View source: R/dist_cavalli.R

Description

This function returns a measure of genetic distance based upon the Cavalli-Sforza & Edwards (1967) distance metric. Assuming drift is the only source or differences observed among strata.

Usage

1
dist_cavalli(x, stratum = "Population")

Arguments

x

The genetic data, either as a single locus or multilocus (data.frame) object.

stratum

The groups among which you are going to estimate genetic distances.

Value

A matrix of Cavalli-Sforza Genetic distance estimates.

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  AA <- locus( c("A","A") )
  AB <- locus( c("A","B") )
  BB <- locus( c("B","B") )
  AC <- locus( c("A","C") )
  AD <- locus( c("A","D") )
  BC <- locus( c("B","C") )
  BD <- locus( c("B","D") )
  CC <- locus( c("C","C") )
  CD <- locus( c("C","D") )
  DD <- locus( c("D","D") )
  loc1 <- c(AA,AB,AC,AD,BB,BC,BD,CC,CD,DD)
  loc2 <- c(AA,AA,AC,AA,CC,CC,AC,CC,AA,AC)
  df <- data.frame( Population=c(rep("Pop-A",5),rep("Pop-B",5)), TPI=loc1, PGM=loc2 )

MarianaLag/Mlag documentation built on Feb. 13, 2020, 12:30 a.m.