pedplot: Plots a Pedigree

Description Usage Arguments Details Value Author(s) Examples

Description

Plots a pedigree

Usage

1
pedplot(Pedig, affected=NULL, status=NULL, label="Indiv", ...)

Arguments

Pedig

Data frame containing the pedigree with columns Indiv (indivdual ID), Sire, Dam, and Sex. Use subPed to ensure that the pedigree is in the correct format.

affected

Logical vector indicating for each individual if its symbol should be plotted in colour. The default NULL means that the individuals in column keep of data frame Pedig are plotted in colour (if present).

status

Logical vector indicating for each individual if its symbol in the plot should be crossed out. The default NULL means that animals from other breeds than those plotted in colour are crossed out.

label

Character vector containing the columns of data frame Pedig to be used as labels.

...

Options passed to the underlying function plot.pedigree from package kinship2.

Details

This function plots a pedigree. If data frame Pedig has logical column keep then the default values mean that the symbols of these animals are plotted in color and for animals from other breeds the symbol is crossed out.

Value

An invisible list returned by the underlying function plot.pedigree from package kinship2.

Author(s)

Robin Wellmann

Examples

1
2
3
4
data(PedigWithErrors)

sPed  <- subPed(PedigWithErrors, keep="276000810087543", prevGen=3, succGen=2)
pedplot(sPed, mar=c(2,4,2,4), label=c("Indiv", "Born", "Breed"), cex=0.4)

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
Pedigree loops were detected. We recommend to correct them manually before
using prePed(). The parents of the following individuals are set to unknown
to remove the loops.
                           Sire             Dam
276000802875148 276000803622423 276000890878480
276000811476506 276000810087663 276000811476506

The sex of the following animals was not compatible with the pedigree, so
it was modified:
                           Sire             Dam
276000810087663 276000802940621 276000802925028

optiSel documentation built on Jan. 16, 2021, 5:30 p.m.