landscape.Fst: Calculates population structure statistic for the entire...

View source: R/popstruct.R

landscape.FstR Documentation

Calculates population structure statistic for the entire landscape

Description

Calculate Fst for each allele at each locus in the landscape. If verb is set to TRUE, the function prints average Fst for loci and overall.

Usage

   landscape.Fst(rland,verb=FALSE)

Arguments

rland

the Rmetasim landscape object

verb

determines whether there is verbose output

Details

Calculates Fst based upon the ratio of variance in allele frequency across subpopulations to the total variance in that allele's frequency. Does not calculate Wright's other statistics.

Value

A matrix with num alleles columns and num loci rows. Each element reflects the value of Fst for that allelexlocus combination. NA is assigned to alleles that are not present at a locus (either no longer or ever)

See Also

obs.het.landscape, exp.het.landscape, FWright.landscape

Examples

  exampleland <- landscape.new.example()
  exampleland <- landscape.simulate(exampleland, 4)
  Fst <- landscape.Fst(exampleland,verb=TRUE)
  Fst
  rm(exampleland,Fst)

stranda/rmetasim documentation built on Aug. 25, 2023, 12:22 p.m.