Skip to contents

generate trial design inputs i.e., geno replications and blocking list

Usage

trial_design_meta(
  trep = rep(c(3, 2, 1, 5), c(6, 11, 36, 4)),
  trgroup = trep,
  block_list = list(c(6, 4), c(6, 2))
)

Arguments

trep

numeric vector of treatment/genotype replications

trgroup

numeric vector of treatment group replication

block_list

a list of blocking field layout

Value

a list

Examples

d <- tempdir()
data("ilri", package = "pbwrangler")
ins_ilri <- geno_by_tubers(ilri)
ilri_prep <- rand_Prep(
  tot = 57,
  ins = ins_ilri,
  rowD = 12,
  trial = "KE24ILR-BIO-IT01",
  n_dummies = 5,
  loc = "ilri",
  totReps =96,
  trtrepP = trial_design_meta()$trep,
  trtgroup = trial_design_meta()$trgroup,
  block_lst = trial_design_meta()$block_list,
  path = NULL
)
#>      Phase,    Search%,    A-measure
#> [1] 1.0000000 0.0000000 0.2718985
#> [1]  1.0000000 10.0000000  0.2666667
#> [1]  1.0000000 20.0000000  0.2666667
#> [1]  1.0000000 30.0000000  0.2666667
#> [1]  1.0000000 40.0000000  0.2666667
#> [1]  1.0000000 50.0000000  0.2666667
#> [1]  1.0000000 60.0000000  0.2666667
#> [1]  1.0000000 70.0000000  0.2666667
#> [1]  1.0000000 80.0000000  0.2666667
#> [1]  1.0000000 90.0000000  0.2666667
#> [1]   1.0000000 100.0000000   0.2666667
#>  [1] 0.2666667 0.2666667 0.2666667 0.0000000 0.0000000 0.0000000 0.0000000
#>  [8] 0.0000000 0.0000000 0.0000000
#> 8 rows by 2 columns
#>      Phase,    Search%,    A-measure
#> [1] 2.0000000 0.0000000 0.2700262
#> [1]  2.0000000 10.0000000  0.2700262
#> [1]  2.0000000 20.0000000  0.2700262
#> [1]  2.0000000 30.0000000  0.2700262
#> [1]  2.0000000 40.0000000  0.2700262
#> [1]  2.0000000 50.0000000  0.2700262
#> [1]  2.0000000 60.0000000  0.2700262
#> [1]  2.0000000 70.0000000  0.2700262
#> [1]  2.0000000 80.0000000  0.2700262
#> [1]  2.0000000 90.0000000  0.2700262
#> [1]   2.0000000 100.0000000   0.2700262
#>  [1] 0.2666667 0.2834646 0.2700262 0.0000000 0.0000000 0.0000000 0.0000000
#>  [8] 0.0000000 0.0000000 0.0000000
#>      Phase,    Search%,    A-measure
#> [1] 1.0000000 0.0000000 0.7591574
#> [1]  1.0000000 10.0000000  0.7437399
#> [1]  1.0000000 20.0000000  0.7437399
#> [1]  1.0000000 30.0000000  0.7437399
#> [1]  1.0000000 40.0000000  0.7437399
#> [1]  1.0000000 50.0000000  0.7437399
#> [1]  1.0000000 60.0000000  0.7437399
#> [1]  1.0000000 70.0000000  0.7437399
#> [1]  1.0000000 80.0000000  0.7437399
#> [1]  1.0000000 90.0000000  0.7437399
#> [1]   1.0000000 100.0000000   0.7437399
#>  [1] 0.7390377 0.7625489 0.7437399 0.0000000 0.0000000 0.0000000 0.0000000
#>  [8] 0.0000000 0.0000000 0.0000000
#> 8 rows by 2 columns
#>      Phase,    Search%,    A-measure
#> [1] 2.0000000 0.0000000 0.7842118
#> [1]  2.0000000 10.0000000  0.7717472
#> [1]  2.0000000 20.0000000  0.7717472
#> [1]  2.0000000 30.0000000  0.7717472
#> [1]  2.0000000 40.0000000  0.7717472
#> [1]  2.0000000 50.0000000  0.7716664
#> [1]  2.0000000 60.0000000  0.7716664
#> [1]  2.0000000 70.0000000  0.7716664
#> [1]  2.0000000 80.0000000  0.7716664
#> [1]  2.0000000 90.0000000  0.7716664
#> [1]   2.0000000 100.0000000   0.7716664
#>  [1] 0.7593699 0.8208523 0.7716664 0.0000000 0.0000000 0.0000000 0.0000000
#>  [8] 0.0000000 0.0000000 0.0000000
#> [1] "#####################################"
#> [1] "# Final search has not yet been run #"
#> [1] "#####################################"
#>      Phase,    Search%,    A-measure
#> [1] 1.000000 0.000000 1.896849
#> [1]  1.000000 10.000000  1.756136
#> [1]  1.00000 20.00000  1.69891
#> [1]  1.000000 30.000000  1.679198
#> [1]  1.000000 40.000000  1.656411
#> [1]  1.000000 50.000000  1.633088
#> [1]  1.000000 60.000000  1.620262
#> [1]  1.000000 70.000000  1.613022
#> [1]  1.000000 80.000000  1.600019
#> [1]  1.000000 90.000000  1.590032
#> [1]   1.000000 100.000000   1.590032
#>  [1] 1.590032 1.590032 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
#>  [9] 0.000000 0.000000
head(ilri_prep$design)
#> [1] NA