# NOT RUN {
# a dropout pr. of 0.5
p <- pr_independent_alleles(0.5)
stopifnot(all.equal(as.vector(p),
c(0.5^2, 2 * 0.5 * 0.5, (1-0.5)^2)))
# one contrib. without dropout and one with d=0.5
p1 <- pr_independent_alleles(c(0, 0.5))
stopifnot(identical(as.integer(names(p1)),
as.integer(names(p)) + 2L))
# }
Run the code above in your browser using DataLab