Description Usage Arguments Value Examples
Assign pens to their compartment randomly but balanced over sex, treatment, and as much as possible over weight class
1 | assignComp(data, nPC = 8, etime = 10)
|
data |
data.table with columns Sex (sex of piglets), Gew_klasse (weight class), Beh (Treatment), and Hok (Pen) |
nPC |
numeric number of pens per compartment |
etime |
numeric number of seconds to allow iterations before dropping the stringency for level of balance to strive for in weight class distribution over compartments |
data.table with added column Comp (compartment)
1 2 3 4 | animalsInTrial <- selectTrialAnimals(biggen,72,72,5.4,9.5)[[1]]
animalsInTrial <- assignPens(animalsInTrial,6)
animalsInTrial <- assignTreatment(animalsInTrial,c("Wit","Groen","Rood","Geel"))
animalsInTrial <- assignComp(animalsInTrial)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.