count_and_plot_ancestry_matrices {CKMRpop} | R Documentation |
This counts up all the different types of pairwise relationships and
makes a plot (or multiple pages of them). For an example, see
the Vignette: vignette("species_1_simulation", package = "CKMRpop")
.
count_and_plot_ancestry_matrices( Pairs, nrow = 6, ncol = 5, white_ball_size = 1 )
Pairs |
a tibble like that returned by |
nrow |
the number of rows to plot per page |
ncol |
the number of columns to plot per page |
white_ball_size |
the size of the white dot plotted on top of the primary shared ancestors' cells. |
Returns a list with the following components:
highly_summarised
: a tibble reporting counts of different types of relationships with
the columns:
dom_relat
: The name of the dominant relationship (e.g. Si, PO, A, etc).
max_hit
: The number of primary shared ancestors.
n
: The number of occurrences of this type of relationship.
dr_counts
: A tibble with the counts of all the different, unique ancestry match matrices
observed, with the following columns:
dom_relat
: The dominant relationship type
dr_hits
: list column with the number of primary shared ancestors in the upper and lower quadrants
of the ancestry match matrix (values are repeated for symmetrical relationships).
max_hit
: the number of primary shared ancestors.
anc_match_matrix
: a list column of ancestry match matrices.
n
: The number of pairs with this type of ancestry match matrix
tot_dom
: The total number of pairs within the given dominant relationship category.
ID
: A unique, properly sorting name for this category for placing a title on
facets of plots of these ancestry match matrices.
dr_plots
: a list named by the dominant relationship. Each component is a ggplot
object which is a plot of the ancestry match matrices, faceted by their ID
's as
given in dr_counts
.
anc_mat_counts
: A tibble summarizing the counts of different ancestry match matrices
without regard to dominant relationship type, etc. Rows are arranged in descending order
of number of pairs observed with each ancestry match matrix. It has the columns:
anc_match_matrix
: a list column of ancestry match matrices.
n
: the number of such matrices observed.
anc_mat_plots
: a list of ggplot pages. These are plots faceted by ancestry match
matrix of all ancestry match matrices observed, ordered by number of occurrences (as
given in anc_mat_counts
).