rarefy_fst: Population-specific FST with sample rarefaction.

Description Usage Arguments Value Examples

View source: R/rarefy_fst.r

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 Aug. 15, 2017, 8:15 p.m.