rarefy_fst: Population-specific FST with sample rarefaction.

Description Usage Arguments Value Examples

Description

Randomly subsample each population in the dataset to a value (rar.n) set by user, then calculate population-specific FST for each population sample using hierfstat::betas. Expects data in hierfstat format.

Usage

1
rarefy_fst(data, rar.n = NULL, reps = 100)

Arguments

rar.n

Rarefied sample size for each population. Must be equal or less than the minimum population sample size. If not specified, rar.n defaults to a value equal to the smallest sample size in the dataset.

reps

Number of iterations to repeat the rarefied FST calculation. If not specified, defaults to 100.

Value

Dataframe of FST estimates, where number of rows equal to iterations, and columns represent populations.

Examples

1
test <- rarefy_fst(dat.sim, rar.n = 5, reps = 100)

Daniel-J-Schmidt/genrich documentation built on May 6, 2019, 10:52 p.m.