Using inner_joins to determine sex of parents. Filter out the parents with the wrong sex. The result contains the ID of the animal, the parent and the wrong sex.

get_tbl_parent_sex_err(
  ptbl_pedigree,
  psym_animal_id,
  psym_parent_id,
  psym_sex_col,
  pvec_parent_by,
  ps_wrong_sex
)

Arguments

ptbl_pedigree

tibble containing pedigree

psym_animal_id

symbol for column header of animal ID

psym_parent_id

symbol for column header of parent ID

psym_sex_col

symbol for column header of sex

pvec_parent_by

vector used as by argument in join

ps_wrong_sex

value for the wrong sex