habitat_clustering: Do genotypes cluster by microhabitat?

View source: R/habitat_clustering.R

habitat_clusteringR Documentation

Do genotypes cluster by microhabitat?

Description

Calculates how many pairs of plants of the same genotype are also in the same microhabitat.

Usage

habitat_clustering(genotype, habitat)

Arguments

genotype

Vector of genotype labels.

habitat

Vector of habitat labels of the same length as genotype.

Details

This calculates Fst as

\frac{f_0-\bar{f}}{1-\bar{f}}

where f_0 is the probability that two individuals in the same habitat are identical and f \bar{f} is the probability that two individuals from the total population are identical.

Value

Proportion of pairs of individuals in the same habitat that are identical.

Author(s)

Tom Ellis


ellisztamas/simmiad documentation built on Dec. 12, 2023, 5:32 a.m.