selectTrialAnimals: Select trial animals

Description Usage Arguments Details Value Examples

View source: R/selectTrialAnimals.R

Description

Select which animals to include and which to exclude from the trial

Usage

1
selectTrialAnimals(data, nB, nZ, minWeight, maxWeight)

Arguments

data

data.table with columns Opm. (comments), Sex (sex of piglets), and Speen_gew (weaning weights of piglets)

nB

numeric number of barrows to be selected

nZ

numeric number of gilts to be selected

minWeight

numeric minimum weight of piglets to be selected

maxWeight

numeric maximum weight of piglets to be selected

Details

If not enough piglets meet the in trial criteria the function removes the lowest weight animals until it is left with the required amount. The function tries to select piglets in such a way that the Coefficient of Variation op weaning weights is minimized

Value

list with elements animalsInTrial (piglets selected for trial) and animalsOutTrial (piglets left out of trial)

Examples

1
animalsInTrial <- selectTrialAnimals(biggen,72,72,5.4,9.5)[[1]]

DataZhukov/animalTrial documentation built on Dec. 17, 2021, 4:08 p.m.