plotPotential: graphical visualization of a mating potential object

View source: R/plotPotential.R

plotPotentialR Documentation

graphical visualization of a mating potential object

Description

Visualize mating potential

Usage

plotPotential(
  matPot,
  subject = NULL,
  plotType = "auto",
  density = TRUE,
  sub.ids = NULL,
  N = 9,
  sample = "random",
  ...
)

Arguments

matPot

a mating potential object

subject

character, either 'ind' or 'pair', indicating whether the subject being visualized is individuals or pairwise interactions

plotType

character, indicating what plots are to be displayed. See details. Options are histogram ('hist'), network diagram ('net'), and heatmap ('heat'). If mating potential object

density

logical. If TRUE (default), plots probability density over histogram.

sub.ids

a vector containing the ids of individuals to be represented in pairwise potential plots

N

a positive number indicating the number of individuals to sample if sub.ids = 'random'

sample

a character string specifying how to choose a subset of individuals to be represented in pairwise potential plots. Possible values are "random" (default) or "all" (see details).

...

optional arguments for the plot function

Details

Options for plotType are 'hist' (histogram), 'net' (network diagram), 'heat' (heatmap), and 'auto'. Default value is 'auto': if the mating potential object contains pairwise potential, 'auto' returns all plot types, otherwise it returns histograms of individual potential.

The individuals to be represented in the pairwise potential plots can either be specified explicitly through sub.ids, chosen randomly (sample = 'random'), or all individuals can be selected (sample = 'all'). The default is to randomly select 9 individuals. If multiple years are being plotted, the subset is sampled from all years and the same individuals will be represented in each year, if possible. If fewer than three individuals from the subset are available in a year, no network diagram or heatmap will be returned for that year.

Value

No return value, called to draw plots

Author(s)

Amy Waananen

See Also

see generic function points for values of pch

Examples

pop <- simulateScene()
sync <- synchrony(pop, "augs")
plotPotential(sync)

mateable documentation built on Feb. 16, 2023, 9:42 p.m.