
Look up the maximum gestation period (days) for one or more species
Source:R/getSpeciesGestation.R
getSpeciesGestation.RdMaps each supplied species name to a conservative upper bound on the number
of days from conception to birth, using the speciesGestation
lookup table (or a supplied gestationTable). Matching is case- and
whitespace-insensitive. Any species that is missing, NA, an empty
string, or not present in the table falls back to default (210 days,
the conservative rhesus bound). Used by getPotentialParents to
key its gestation window on the first-class species pedigree column.
Arguments
- species
character vector of species names (may contain
NA).- gestationTable
optional data.frame with a character column
speciesand an integer columngestationto use instead of the bundledspeciesGestationtable. Defaults toNULL, which uses the bundled table.- default
integer fallback returned for species that are missing,
NA, empty, or not found in the table. Defaults to210L.
Examples
getSpeciesGestation("RHESUS")
#> [1] 210
getSpeciesGestation(c("RHESUS", "UNICORN", NA))
#> [1] 210 210 210