Learn R Programming

nprcgenekeepr (version 1.0.5)

fillGroupMembersWithSexRatio: Forms breeding group(s) with an effort to match a specified sex ratio

Description

The sex ratio is the ratio of females to males.

Usage

fillGroupMembersWithSexRatio(
  candidates,
  groupMembers,
  grpNum,
  kin,
  ped,
  minAge,
  numGp,
  sexRatio
)

Arguments

candidates

character vector of IDs of the animals available for use in the group.

groupMembers

list initialized and ready to receive groups with the desired sex ratios that are created within this function

grpNum

is a list numGp long with each member an integer vector of 1:numGp.

kin

list of animals and those animals who are related above a threshold value.

ped

dataframe that is the `Pedigree`. It contains pedigree information including the IDs listed in candidates.

minAge

integer value indicating the minimum age to consider in group formation. Pairwise kinships involving an animal of this age or younger will be ignored. Default is 1 year.

numGp

integer value indicating the number of groups that should be formed from the list of IDs. Default is 1.

sexRatio

numeric value indicating the ratio of females to males x from 0.5 to 20 by increments of 0.5.