mendel.Rd
Generate conditional probability table for Mendelian segregation.
mendel(allele, names = c("child", "father", "mother"))
No error checking at all on the input.
## Inheritance of the alleles "y" and "g"
men <- mendel(c("y","g"), names=c("ch", "fa", "mo"))
men
#> ch fa mo prob
#> 1 yy yy yy 1.00
#> 2 yg yy yy 0.00
#> 3 gg yy yy 0.00
#> 4 yy yg yy 0.50
#> 5 yg yg yy 0.50
#> 6 gg yg yy 0.00
#> 7 yy gg yy 0.00
#> 8 yg gg yy 1.00
#> 9 gg gg yy 0.00
#> 10 yy yy yg 0.50
#> 11 yg yy yg 0.50
#> 12 gg yy yg 0.00
#> 13 yy yg yg 0.25
#> 14 yg yg yg 0.50
#> 15 gg yg yg 0.25
#> 16 yy gg yg 0.00
#> 17 yg gg yg 0.50
#> 18 gg gg yg 0.50
#> 19 yy yy gg 0.00
#> 20 yg yy gg 1.00
#> 21 gg yy gg 0.00
#> 22 yy yg gg 0.00
#> 23 yg yg gg 0.50
#> 24 gg yg gg 0.50
#> 25 yy gg gg 0.00
#> 26 yg gg gg 0.00
#> 27 gg gg gg 1.00