get_female_exposed_to_male_days: Get number of days females were exposed to fertile males.

Description Usage Arguments Value

View source: R/animalr.R

Description

Get number of days females were exposed to fertile males.

Usage

1
2
3
4
5
6
7
8
9
get_female_exposed_to_male_days(
  conn,
  arc_species_code = "PC",
  min_date = "01-01-2014",
  max_date = strftime(Sys.Date(), format = "%m-%d-%Y"),
  male_age = 48,
  female_age = 42,
  gestation_length = 183
)

Arguments

conn

database connection object

arc_species_code

optional character vector of length 1 having the two character arc_species_code defined by the IACUC. Defaults to "PC".

min_date

optional character vector of length 1 having the first date to be included in the time frame of interest. Defaults to "01-01-2014". Should be formatted as "%m-%d-%Y".

max_date

optional character vector of length 1 having the last date to be included in the time frame of interest. Defaults to current date. Should be formatted as "%m-%d-%Y".

male_age

integer value in months that indicates the minimum age the male must be on each day with a female.

female_age

integer value in months that indicates the minumum age the female must be on each day with a male.

gestation_length

integer value indicating the gestation length in days for the species. Animals exposed to the male less than the gestational length are not included. This can be set to 0 to include all females exposed to fertile males for any length of time. Defaults to 183.

Value

dataframe with id (female Id), days (number of days exposed), current_location, min_date (first date of exposure), and max_date (last date of exposure).

Males having an attribute of "vasectomized" are not included.


rmsharp/animalr documentation built on March 10, 2021, 1:12 p.m.