Skip to contents

Mate selected sires and dams to construct a new cohort

Usage

gsim_mate(
  pedigree,
  sires,
  dams,
  offspring,
  seed = 1,
  generation = NULL,
  sex = NULL
)

Arguments

pedigree

Validated gsim_pedigree containing all candidate parents.

sires, dams

Selected parent ID vectors. Known sex must match its role.

offspring

New unique offspring IDs, disjoint from the pedigree.

seed

Nonnegative identity-stream seed.

generation

Optional offspring generation; defaults to one after the latest parent.

sex

Optional named offspring sex vector (M or F); otherwise drawn natively.

Value

List with offspring, freshly validated combined pedigree, actual parents_used and settings. Each child draws both parents independently, uniformly with replacement, using a stream keyed by child identity.