magnusdv / pedtools

Tools for working with pedigrees in R
GNU General Public License v3.0
23 stars 3 forks source link

Disconnected random pedigrees #31

Closed magnusdv closed 1 year ago

magnusdv commented 2 years ago

For example:

pedtools::randomPed(g = 2, founders = 3, seed = 123)
#> $`_comp1`
#>  id fid mid sex
#>   1   *   *   1
#>   3   *   *   2
#>   4   1   3   1
#>   5   4   3   1
#> 
#> $`_comp2`
#>  id fid mid sex
#>   2   *   *   1
#> 
#> attr(,"class")
#> [1] "pedList" "list"

randomPed() should perhaps have an argument connected, by default TRUE.