Learn R Programming

forrel (version 1.0.0)

showInTriangle: Add points to the IBD triangle

Description

Utility function for plotting points in the IBD triangle.

Usage

showInTriangle(
  k0,
  k2 = NULL,
  new = TRUE,
  col = "blue",
  cex = 1,
  pch = 4,
  lwd = 2,
  labels = FALSE,
  col_labels = col,
  cex_labels = 0.8,
  pos = 1,
  adj = NULL,
  ...
)

Arguments

k0, k2

Numerical vectors giving coordinates for points to be plotted in the IBD triangle. Alternatively, k0 may be a data.frame containing columns named k0 and k2.

new

Logical indicating if a new IBDtriangle should be drawn.

col, cex, pch, lwd

Parameters passed onto points().

labels

A character of same length as k0 and k2, or a single logical TRUE or FALSE. If TRUE, and k0 is a data.frame, labels will be created by pasting columns "ID1" and "ID2", if these are present. By default, no labels are plotted.

col_labels, cex_labels, pos, adj

Parameters passed onto text() (if labels is non-NULL).

Plot arguments passed on to IBDtriangle().

Value

None

See Also

IBDestimate()

Examples

Run this code
# NOT RUN {
showInTriangle(k0 = 3/8, k2 = 1/8, label = "3/4 siblings", pos = 1)

# }

Run the code above in your browser using DataLab