Construct adjacency matrices corresponding to pedigrees.
A square matrix, converted internally to be of "logical" type. If
A gender vector, i.e. a vector where all elements are 1 (male) or 2 (female).
A logical indicating if the validity of the created object should be checked.
A pedigree can be thought of a a directed acyclic graph (DAG), with the pedigree members as nodes, and an edge from A to B if and only if A is a parent of B. Since no pedigree member have more than 2 parents, any node of the corresponding graphs has at most 2 incoming edges.
The adjacency matrix of a graph G is a square logical matrix with TRUE in entry (i,j) if and only if there is an edge from node i to node j.
Since gender is not encoded in the adjacency matrix itself, we add the vector
of genders as an attribute
An object of class
adjMatrix. This is a square logical matrix, with
sex which is an integer vector of gender codes (1 = male; 2
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.