Learn R Programming

nprcgenekeepr (version 3.0.0)

chooseAlleles: Combine two allele vectors by Mendelian sampling

Description

Combine two allele vectors by Mendelian sampling

Usage

chooseAlleles(a1, a2)

Value

An integer vector with the result of sampling from a1

and a2 according to Mendelian inheritance.

Arguments

a1

integer vector with the alleles of one parent, one per simulated iteration

a2

integer vector with the other alleles of the same parent, one per simulated iteration. a1 and a2 are expected to be equal length vectors; if they are not, the shorter is recycled silently.

Examples

Run this code
chooseAlleles(0L:4L, 5L:9L)

Run the code above in your browser using DataLab