Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/plot.pedigree.r
A function to visualize pedigree structure by a graph using the
igraph
package. Each genotype is represented as vertex and direct
offsprings are linked by an edge.
1 2 |
x |
object of class |
effect |
vector of length |
... |
Other arguments for function |
The pedigree is structured top to bottom. The first generation is printed in
the first line. Links over more than one generation are possible as well as
genotypes with only one (known) parent. Usually, no structure in one
generation is plotted. If an effect
is given, the genotypes are
ordered by this effect in the horizontal direction and a labeled axis is
plotted at the bottom.
A named graph visualizing the pedigree structure. Color is used to distinguish sex.
This function uses the plotting method for graphs in the library
igraph
Valentin Wimmer and Hans-Juergen Auinger
create.pedigree
, simul.pedigree
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | id <- paste("ID", 1:9, sep = "0")
par1 <- paste("ID", c("", "", "", "", 1, 1, 1, 4, 7), sep = "0")
par2 <- paste("ID", c("", "", "", "", 2, 3, 2, 5, 8), sep = "0")
ped1 <- create.pedigree(id, par1, par2, unknown = "ID0")
ped1
plot(ped1)
# create 2nd pedigree object
Id <- paste("ID", 10:16, sep = "")
Par1 <- paste("ID", c("", "", 1, 1, 6, 7, 7), sep = "0")
Par2 <- paste("ID", c("", "", 10, "08", "09", 11, 14), sep = "")
ped2 <- create.pedigree(Id, Par1, Par2, unknown = c("ID0", "ID"))
ped2
ped <- add.pedigree(ped1, ped2)
plot(ped)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.