calculate_calvingscore_proportion: Calculate calving score proportions

View source: R/calving.R

calculate_calvingscore_proportionR Documentation

Calculate calving score proportions

Description

The program package ECOWEIGHT (C Programs for Calculating Economic Weights in Livestock) need input parameter files. This function will calculate based on breed, sex as well as lactation number of the dam (primiparous vs multiparous) the calving score proportion.

Usage

calculate_calvingscore_proportion(
  ps_input_calving_tibble,
  ps_statement_firstlactation = TRUE,
  ps_sex,
  ps_calvingscore,
  ps_sirebreed,
  ps_dambreed,
  pb_log = FALSE,
  plogger = NULL
)

Arguments

ps_input_calving_tibble

input calving tibble coming from read_file_input_calving in this package

ps_statement_firstlactation

statement if in first lactation status (TRUE or FALSE)

ps_sex

set the sex (F, M)

ps_calvingscore

set the calving score for which the proportion should be calculated (2,3,4)

ps_sirebreed

set the breed (AN, AU, CH, LM, SI, OB)

ps_dambreed

set the breed (AN, AU, CH, LM, SI, OB, HO, BS)

pb_log

indicator whether logs should be produced

plogger

logger object

Value

calving score proportion vector


sknqualitasag/qp4ewc documentation built on Sept. 27, 2022, 3:31 p.m.