Learn R Programming

synbreed (version 0.10-2)

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, \ldots)

Arguments

x
Object of class relationshipMatrix
...
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,at=seq(0,2,length=9))
plot(U,at=seq(0,2,length=9))

Run the code above in your browser using DataLab