Part of Pedigree Curation
Details
Returns an updated dataframe with duplicate rows removed.
Returns an error if the table has duplicate IDs with differing data.
Examples
ped <- nprcgenekeepr::smallPed
newPed <- cbind(ped, recordStatus = rep("original", nrow(ped)))
ped1 <- removeDuplicates(newPed)
nrow(newPed)
#> [1] 17
nrow(ped1)
#> [1] 17
pedWithDups <- rbind(newPed, newPed[1:3, ])
ped2 <- removeDuplicates(pedWithDups)
nrow(pedWithDups)
#> [1] 20
nrow(ped2)
#> [1] 17