View source: R/removeDuplicates.R
| removeDuplicates | R Documentation |
Part of Pedigree Curation
removeDuplicates(ped, reportErrors = FALSE)
ped |
dataframe that is the |
reportErrors |
logical value if TRUE the function returns a
character vector of duplicate |
Returns an updated dataframe with duplicate rows removed.
Returns an error if the table has duplicate IDs with differing data.
When reportErrors is FALSE, a Pedigree
object with duplicate rows removed; when reportErrors is
TRUE, a character vector of duplicate id values (or
NULL when none are found).
ped <- nprcgenekeepr::smallPed
newPed <- cbind(ped, recordStatus = rep("original", nrow(ped)))
ped1 <- removeDuplicates(newPed)
nrow(newPed)
nrow(ped1)
pedWithDups <- rbind(newPed, newPed[1:3, ])
ped2 <- removeDuplicates(pedWithDups)
nrow(pedWithDups)
nrow(ped2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.