magnusdv/pedtools

Inaccurate error message in `addSon()`/`addDaughter()`

Closed this issue · 1 comments

library(pedtools)

nuclearPed() |> addSon(parents = c(1,1))
#> Mother: Creating new individual with ID =
#> Error: Arguments `new` and `old` must have the same length

Created on 2024-02-28 with reprex v2.0.2

Thanks. As of 38e3803 this gives a more sensible error message:

library(pedtools)
nuclearPed() |> addSon(parents = c(1,1))
#> Error: Duplicated parent: 1

Created on 2024-03-01 with reprex v2.1.0