Sample genotype without error
Examples
Z <- sample_profiles_without_error(n = 2, p = c(0.25, 0.25, 0.5))
to012(Z)
#> [,1]
#> [1,] 2
#> [2,] 1
Z <- sample_profiles_without_error(n = 5, p = list(
c(0.25, 0.25, 0.5), c(0.1, 0.8, 0.1)))
Z
#> [[1]]
#> [,1] [,2]
#> [1,] 0 0
#> [2,] 1 1
#> [3,] 1 1
#> [4,] 1 1
#> [5,] 1 0
#>
#> [[2]]
#> [,1] [,2]
#> [1,] 1 0
#> [2,] 0 1
#> [3,] 0 0
#> [4,] 1 0
#> [5,] 1 0
#>
to012(Z)
#> [,1] [,2]
#> [1,] 0 1
#> [2,] 2 1
#> [3,] 2 0
#> [4,] 2 1
#> [5,] 1 1