Learn R Programming

nprcgenekeepr (version 1.0.8)

chooseAlleles: Combines two vectors of alleles by randomly selecting one allele or the other at each position.

Description

Combines two vectors of alleles by randomly selecting one allele or the other at each position.

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 first allele for each individual

a2

integer vector with second allele for each individual a1 and a2 are equal length vectors of alleles for one individual

Examples

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

Run the code above in your browser using DataLab