Description Usage Arguments Value Note Examples
View source: R/genetic_relatedness.R
This function returns single relatedness estimates as a pairwise matrix.
1 2 3 4 5 6 | genetic_relatedness(
x,
loci = NA,
mode = c("Nason", "LynchRitland")[1],
freqs = NA
)
|
x |
A |
loci |
The loci to use (if missing all loci are used). |
mode |
The kind of relatedness to be estimated. Currently Fij (the default) and LynchRitland are available. |
freqs |
An optional |
A matrix of pairwise relatedness estimates.
This only works on diploid data and will return NA for any comparison of missing genotypes.
1 2 3 | loci <- c( locus(1:2), locus(c(2,2)), locus(1:2) )
genetic_relatedness( loci )
genetic_relatedness( loci, freqs = data.frame( Allele=c("1","2"), Frequency=c(0.5,0.5)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.