ped_rename | R Documentation |
Functions in purgeR require individuals to be named with integers from 1 to N. This takes a dataframe containing a pedigree, and rename individuals having names in any format to that required by other functions in purgeR. The process will also check that the pedigree format is suitable for other functions in the package.
ped_rename(ped, id = "id", dam = "dam", sire = "sire", keep_names = FALSE)
ped |
A dataframe containing the pedigree. Individual (id), maternal (dam), and paternal (sire) identities are mandatory columns. |
id |
A string naming the column with individual identities. It will be renamed to its default value 'id'. |
dam |
A string naming the column with maternal identities. It will be renamed to its default value 'dam'. |
sire |
A string naming the column with paternal identities. It will be renamed to its default value 'sire'. |
keep_names |
A boolean value indicating whether the original identity values should be kept on a separate column (named 'names'), or not. |
A dataframe with the pedigree's identities renamed.
ped_clean
data(darwin)
darwin <- ped_rename(darwin, id = "Individual", dam = "Mother", sire = "Father", keep_names = TRUE)
head(darwin)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.