magnusdv / pedtools

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

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

Closed chrcarrizosa closed 6 months ago

chrcarrizosa commented 6 months ago
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

magnusdv commented 6 months ago

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