Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

relabel

Get or modify pedigree labels


Description

Functions for getting or changing the ID labels of pedigree members.

Usage

relabel(x, new, old = labels(x), reorder = FALSE)

## S3 method for class 'ped'
labels(object, ...)

## S3 method for class 'list'
labels(object, ...)

Arguments

x

A ped object or a list of such.

new, old

Character vectors (or coercible to character) of the same length. ID labels in old are replaced by those in new.

reorder

A logical. If TRUE, reorderPed() is called on x after relabelling. Default: FALSE.

object

A ped object

...

Not used

Value

  • labels() returns a character vector containing the ID labels of all pedigree members. If the input is a list of ped objects, the output is a list of character vectors.

  • relabel() returns ped object similar to the input except for the labels.

Author(s)

Magnus Dehli Vigeland

See Also

Examples

x = nuclearPed()
x
labels(x)

relabel(x, new = "girl", old = 3)

pedtools

Creating and Working with Pedigrees and Marker Data

v0.9.7
GPL-3
Authors
Magnus Dehli Vigeland [aut, cre] (<https://orcid.org/0000-0002-9134-4962>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.