Skip to contents

row column design: plots = row by col; equal rep for each treatment

Usage

randomize_row_col(
  clones,
  tot,
  trial,
  rowD,
  n_dummies = 0,
  rep,
  season,
  path = t_dir,
  check = c("Shangi", "Unica", "Sagitta", "Sherekea"),
  dummy = c("Unica", "Shangi"),
  to_add = 4
)

Arguments

clones

a dataframe with geno column

tot

integer. total number of unique clones/genotypes to be randomized to field

trial

character. trial

rowD

integer. number of rows in the field

n_dummies

integer. number of dummies to complete a rectangular layout

rep

integer. number of replication

season

season of trial

path

character specifying path to write the design

check

a character vector of checks to fill rectangular grid

dummy

a character vector of dummy checks to fill rectangular grid

to_add

integer. number of checks to add to complete the rectangular grid

Examples

df <- data.frame(geno = LETTERS[1:4])
rcD <-
  randomize_row_col(
    clones = df,
    trial = "KE24ILR-BW-ST01",
    tot = 6,
    rowD = 6,
    n_dummies = 0,
    to_add = 2,
    rep = 3,
    path = NULL
  )
#>      Phase,    Search%,    A-measure
#> [1] 1.000000 0.000000 1.002506
#> [1]  1.0000000 10.0000000  0.7919192
#> [1]  1.0000000 20.0000000  0.7919192
#> [1]  1.0000000 30.0000000  0.7919192
#> [1]  1.0000000 40.0000000  0.7919192
#> [1]  1.0000000 50.0000000  0.7919192
#> [1]  1.0000000 60.0000000  0.7919192
#> [1]  1.0000000 70.0000000  0.7919192
#> [1]  1.0000000 80.0000000  0.7919192
#> [1]  1.0000000 90.0000000  0.7919192
#> [1]   1.0000000 100.0000000   0.7919192
#>  [1] 0.7919192 0.7919192 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
#>  [8] 0.0000000 0.0000000 0.0000000
#> 1 row by 3 columns
#>      Phase,    Search%,    A-measure
#> [1] 2.0000000 0.0000000 0.8554697
#> [1]  2.0000000 10.0000000  0.7919192
#> [1]  2.0000000 20.0000000  0.7919192
#> [1]  2.0000000 30.0000000  0.7919192
#> [1]  2.0000000 40.0000000  0.7919192
#> [1]  2.0000000 50.0000000  0.7919192
#> [1]  2.0000000 60.0000000  0.7919192
#> [1]  2.0000000 70.0000000  0.7919192
#> [1]  2.0000000 80.0000000  0.7919192
#> [1]  2.0000000 90.0000000  0.7919192
#> [1]   2.0000000 100.0000000   0.7919192
#>  [1] 0.7919192 0.7919192 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
#>  [8] 0.0000000 0.0000000 0.0000000
head(rcD$fieldbook)
#>                    plot     geno entry row column rep
#> 1 KE24ILR-BW-ST01-00001        B     2   1      1   1
#> 2 KE24ILR-BW-ST01-00002        D     4   2      1   1
#> 3 KE24ILR-BW-ST01-00003 Sherekea     5   3      1   1
#> 4 KE24ILR-BW-ST01-00004        A     1   4      1   1
#> 5 KE24ILR-BW-ST01-00005        C     3   5      1   1
#> 6 KE24ILR-BW-ST01-00006    Unica     6   6      1   1