Learn R Programming

nprcgenekeepr (version 1.0.5)

getSexRatioWithAdditions: getSexRatioWithAdditions returns the sex ratio of a group.

Description

Adding males and females to the ratio calculation is possible, but the default behavior is to simply return the sex ratio of the group. This is a helper routine for the main one calculateSexRatio.

Usage

getSexRatioWithAdditions(ids, ped, additionalMales, additionalFemales)

Arguments

ids

character vector of animal Ids

ped

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

additionalMales

Integer value of males to add to those within the group when calculating the ratio. Ignored if calculated ratio is 0 or Inf. Default is 0.

additionalFemales

Integer value of females to add to those within the group when calculating the ratio. Ignored if calculated ratio is 0 or Inf. Default is 0.