magnusdv / ribd

Computation of pedigree-based relatedness coefficients. Part of the ped suite packages for pedigree analysis in R
https://magnusdv.github.io/pedsuite/
6 stars 1 forks source link

`kinship()` and `inbreeding()` should catch duplicated labels #16

Closed magnusdv closed 10 months ago

magnusdv commented 1 year ago
library(ribd)
#> Loading required package: pedtools
x = list(singleton(1), singleton(1))
inbreeding(x)
#>  1  1 
#>  0 -1
kinship(x)
#>     1 1
#> 1 0.5 0
#> 1 0.0 0

Created on 2023-08-18 with reprex v2.0.2

magnusdv commented 1 year ago

kappaIBD() does better:

kappaIBD(x)
#> Error: ID label is not unique: 1

Created on 2023-08-18 with reprex v2.0.2