Learn R Programming

pedtools (version 1.1.0)

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 ped labels(object, ...)

# S3 method for 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.

See Also

ped()

Examples

Run this code
# NOT RUN {
x = nuclearPed()
x
labels(x)

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

# }

Run the code above in your browser using DataLab