sampleEntryNumbers: sampleEntryNumbers function

Description Usage Arguments Details Value Examples

View source: R/SpecifyPipeline.R

Description

Specify a range of percentages that are allowable for the stages. Function will sample within those percentages and generate a consistent scheme to test. For the stage that gets genotyped, the budget is forced to be the sum of the genotyping + trialling costs.

Usage

1
sampleEntryNumbers(bsp, targetBudget, percentRanges, nAttempts = 5)

Arguments

bsp

A list of objects to combine with the species and population parameters. bsp is short for breeding sheme parameters

targetBudget

Numeric value that you want the budget adjusted to

percentRanges

Numeric matrix with nStages+1 rows and two columns. Columns are min and max percentage of budget. Rows are costs for crossing, genotyping, trialing each stage.

nAttempts

Integer maximum number of attempts to sample percentages and have them follow the rules of stages becoming progressively smaller.

Details

Call this function after running specifyCosts.

Value

A revised bsp with the sizes of the stages within the percentage ranges specified.

Examples

1
2
3
4
Assume stages of CET, PYT, UYT, so percentRanges needs 4 rows
Assume CET is genotyped so more budget there
percentRanges <- matrix(c(0.02, 0.24, 0.12, 0.12, 0.06, 0.55, 0.30, 0.30), nrow=4)
bsp <- sampleEntryNumbers(bsp, targetBudget=50000, percentRanges=percentRanges)

jeanlucj/AlfSimHlpR documentation built on Nov. 7, 2021, 5:10 p.m.