Description Usage Arguments Value Author(s) References Examples
This function calculates Nei's genetic distance (Nei 1972) between populations or individuals
1 | stamppNeisD(geno, pop = TRUE)
|
geno |
a data frame containing allele frequency data generated from stamppConvert, or a genlight object containing genotype data, individual IDs, population IDs and ploidy levels |
pop |
logical. True if genetic distance should be calculated between populations, false if it should be calculated between individual |
A object of class matrix which contains the genetic distance between each population or individual
Luke Pembleton <luke.pembleton at agriculture.vic.gov.au>
Nei M (1972) Genetic Distance between Populations. The American Naturalist 106, 283-292.
1 2 3 4 5 6 7 | # import genotype data and convert to allele frequecies
data(potato.mini, package="StAMPP")
potato.freq <- stamppConvert(potato.mini, "r")
# Calculate genetic distance between individuals
potato.D.ind <- stamppNeisD(potato.freq, FALSE)
# Calculate genetic distance between populations
potato.D.pop <- stamppNeisD(potato.freq, TRUE)
|
Loading required package: pegas
Loading required package: ape
Loading required package: adegenet
Loading required package: ade4
Registered S3 method overwritten by 'spdep':
method from
plot.mst ape
/// adegenet 2.1.3 is loaded ////////////
> overview: '?adegenet'
> tutorials/doc/questions: 'adegenetWeb()'
> bug reports/feature requests: adegenetIssues()
Registered S3 method overwritten by 'pegas':
method from
print.amova ade4
Attaching package: ‘pegas’
The following object is masked from ‘package:ade4’:
amova
The following object is masked from ‘package:ape’:
mst
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.