kronecker_delta: This function returns the kronecker operator for two loci.

Description Usage Arguments Value Note Author(s) Examples

View source: R/kronecker_delta.R

Description

This is a quick utility function that provides the Kronecker operators for a pair of loci

Usage

1
kronecker_delta(locus1, locus2)

Arguments

locus1

An object of type 'locus'

locus2

An object of type 'locus'

Value

a named vector of kronecker products.

Note

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)

Author(s)

Rodney J. Dyer <rjdyer@vcu.edu>

Examples

1
2
3
4
5
6
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 )

MarianaLag/Mlag documentation built on Feb. 13, 2020, 12:30 a.m.