Learn R Programming

synbreed (version 0.11-22)

plot.relationshipMatrix: Heatmap for relationship Matrix

Description

Visualization for objects of class relationshipMatrix using a heatmap of pairwise relatedness coefficients.

Usage

## S3 method for class 'relationshipMatrix':
plot(x, levelbreaks=NULL, \ldots)

Arguments

x
Object of class relationshipMatrix
levelbreaks
Defined breaks in the color scheme of the levelplot. If you make to many breaks, the color scheme repeats!
...
further graphical arguments passed to function levelplot in package lattice. To create equal colorkeys for two heatmaps, use at=seq(from,to,length=9).

Examples

Run this code
# small pedigree
ped <- simul.pedigree(gener=4,7)
gp <- create.gpData(pedigree=ped)
A <- kin(gp,ret="add")
plot(A)

# big pedigree
library(synbreedData)
data(maize)
K <- kin(maize,ret="kin")
U <- kin(codeGeno(maize),ret="realized")/2
# equal colorkeys
plot(K,levelbreaks=seq(0,2,length=9))
plot(U,levelbreaks=seq(0,2,length=9))

Run the code above in your browser using DataLab