ped_rename: Rename individuals in a pedigree from 1 to N

View source: R/rename.R

ped_renameR Documentation

Rename individuals in a pedigree from 1 to N

Description

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.

Usage

ped_rename(ped, id = "id", dam = "dam", sire = "sire", keep_names = FALSE)

Arguments

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.

Value

A dataframe with the pedigree's identities renamed.

See Also

ped_clean

Examples

data(darwin)
darwin <- ped_rename(darwin, id = "Individual", dam = "Mother", sire = "Father", keep_names = TRUE)
head(darwin)

purgeR documentation built on May 29, 2024, 7:24 a.m.