locus-operator-minus: Overload '-' operator for pairs of 'locus' objects

-.locusR Documentation

Overload '-' operator for pairs of locus objects

Description

An overload of the - operator for locus objects that removes the contribution of a parental genotype to a offspring genotype (if possible).

Usage

## S3 method for class 'locus'
e1 - e2

Arguments

e1

A locus object reprenting the offspring.

e2

A locus object representing the parent.

Value

A new locus object that represents the genotypes left over after removing the parental part (if possible).

Note

In some cases it is not possible to remove parental alleles (e.g., consider cases where both parent and offspring are the same heterozygote).

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples


mom <- locus( c("A", "A") ) 
off <- locus( c("A", "B") )
dad.gamete <- off - mom
dad.gamete


dyerlab/gstudio documentation built on Feb. 2, 2024, 8:24 p.m.