SHNe: Calculate distance-based Spatial-Heterogeneity-in-Ne (SHNe)...

View source: R/SHNe.R

SHNeR Documentation

Calculate distance-based Spatial-Heterogeneity-in-Ne (SHNe) metrics

Description

Use formulas from Prunier et al. to calculate di and dhm

Usage

SHNe(n.samples,
            pop.size,
            output = 'df')

Arguments

n.samples

Specify the number of samples (populations) included in your analysis

pop.size

Provide a vector of values that indicates Ne for each sampled population. These values should be ordered the same as your sample populations

output

Default is 'df', will return a data frame with distance measures. If 'matrix' is specified, then a list containing a matrix for each distance measure is produced.

Value

Either a data frame or a list of matrices containing the SHNe metrics

Author(s)

Bill Peterman <Peterman.73@osu.edu>

References

Prunier, J. G., V. Dubut, L. Chikhi, and S. Blanchet. 2017. Contribution of spatial heterogeneity in effective population sizes to the variance in pairwise measures of genetic differentiation. Methods in Ecology and Evolution 8:1866-1877.

#' @examples ## Create vector of Ne Ne <- rep(c(5, 25, 100), each = 3) SHNe.out <- SHNe(n.samples = length(Ne), pop.size = Ne )

Examples

 
## Not run:
## *** TO BE COMPLETED *** ##

## End (Not run)

wpeterman/ResistanceGA documentation built on Nov. 20, 2023, 11:50 p.m.