plot.IBD {KinMixLite}R Documentation

Plot IBD patterns and pattern distributions

Description

Plot IBD patterns and pattern distributions

Usage

## S3 method for class 'IBD'
plot(x,labels=NULL,probs=NULL,order=NULL,colrs=c('black','red','blue'), 
digits=3,nr=ceiling(sqrt(np)),...)

Arguments

x

A matrix whose rows are IBD patterns, or a list whose components are patt, such a matrix, together with pr, a vector of the corresponding probabilities

labels

Vector of numerical or character labels for the patterns, if NA, labels are constructed from the patterns by catenation, if NULL, the labels are not displayed.

probs

Vector of probabilities of the patterns, if not provided as a component of pattern; if NULL, the probabilities are not displayed.

order

A character string, partially matched using pmatch to one of 'pattern', 'probs', or 'labels', requesting ordering diagram accordingly (in the case of probs in decreasing order, or a numeric, complex, character or logical vector of length the number of patterns, requesting ordering by this variable, or NULL (the default), requesting no re-ordering.

colrs

A vector of colours: ties in the ordering variable are indicated by coloured groups, with colours chosen cyclically from this vector.

digits

Integer, overwriting default number of significant digits for probs

nr

Integer, overwriting default number of rows for plotted array, default a rounding up of the square root of the number of patterns.

...

additional arguments to plot

Value

No value is returned, the function is called for its side effect, a plot on the current display device.

Author(s)

Peter Green (P.J.Green@bristol.ac.uk)

Examples

require(ribd)
data(emperors)

plot.IBD(convertIBD('3cousins-star'),order='probs',col=c('blue','red','black'))

plot(attr(emperors,'ped'))

o<-order(emperors$pr)[1:12]
plot.IBD(emperors$patt[o,],probs=emperors$pr[o],labels=NA,order='probs')

[Package KinMixLite version 2.1.0 Index]