View source: R/kronecker_delta.R
kronecker_delta | R Documentation |
This is a quick utility function that provides the Kronecker operators for a pair of loci
kronecker_delta(locus1, locus2)
locus1 |
An object of type 'locus' |
locus2 |
An object of type 'locus' |
a named vector of kronecker products.
The Kronecker operator is a vector consisting of values related to the similarity of alleles among two loci. For the genotypes AiAj and AkAl the Kronecker deltas are =0 of the subscripted alleles are different and =1 if they are the same (e.g., dij = 0 if heterozygote, = 1 if homozygote)
Rodney J. Dyer <rjdyer@vcu.edu>
loc1 <- locus( c(1,1) )
loc2 <- locus( c(1,2) )
loc3 <- locus( c(2,2) )
kronecker_delta( loc1, loc2 )
kronecker_delta( loc1, loc3 )
kronecker_delta( loc2, loc3 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.