dist_jaccard: Estimation of jaccard distance

View source: R/dist_jaccard.R

dist_jaccardR Documentation

Estimation of jaccard distance

Description

This function returns a measure of genetic distance based upon the Jaccard set distance metric.

Usage

dist_jaccard(x, stratum = "Population")

Arguments

x

A data.frame with both stratum and locus objects in them.

stratum

The name of the stratum variable in x

Value

A matrix of Jaccard distance

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

  AA <- locus( c("A","A") )
  AB <- locus( c("A","B") )
  AC <- locus( c("A","C") )
  BB <- locus( c("B","B") )
  BC <- locus( c("B","C") )
  CC <- locus( c("C","C") )
  loci <- c(AA,AA,AB,AA,BB,BC,CC,BB,BB,CC)
  df <- data.frame( Population=c(rep("A",5),rep("B",5) ), TPI=loci )
  dist_jaccard(df)

dyerlab/gstudio documentation built on Feb. 2, 2024, 8:24 p.m.