Learn R Programming

gap (version 1.6)

pedtodot_verbatim: Pedigree-drawing with graphviz

Description

Pedigree-drawing with graphviz

Usage

pedtodot_verbatim(f, run = FALSE, toDOT = FALSE, ...)

Value

No value is returned but outputs in .dot, .pdf, and .svg.

Arguments

f

A data.frame containing pedigrees, each with pedigree id, individual id, father id, mother id, sex and affection status.

run

A flag to run dot/neato on the generated .dot file(s).

toDOT

A flag to generate script for DOT::dot().

...

Other flag(s) for DOT::dot().

Details

Read a GAS or LINKAGE format pedigree, return a digraph in the dot language and optionally call dot/neato to make pedigree drawing.

This is a verbatim translation of the original pedtodot implemneted in Bash/awk in contrast to pedtodot which was largely a mirror. To check independently, try xsel -i < <(cat pedtodot_verbatim.R) or cat pedtodot_verbatim.R | xsel -i and paste into an R session.

Examples

Run this code
if (FALSE) {
# pedigree p3 in pedtodot
  pedtodot_verbatim(p3,run=TRUE,toDOT=TRUE,return="verbatim")
}

Run the code above in your browser using DataLab