row column design: plots = row by col; equal rep for each treatment
Source:R/randomize_row_col.R
randomize_row_col.Rd
row column design: plots = row by col; equal rep for each treatment
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
- rowsinR
integer. number of rows in template replicate block; for blocking
- colsinR
integer. number of columns in template replicate block; for blocking
- 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
Note: To optimize on the row or column, remember that rep * rowsinR = rowD or rep * colsinR = colsD.
Examples
df <- data.frame(geno = LETTERS[1:4])
rcD <-
randomize_row_col(
clones = df,
trial = "KE24ILR-BW-ST01",
tot = 6,
rowD = 3,
rowsinR = 3,
colsinR = 2,
n_dummies = 0,
to_add = 2,
rep = 3,
path = NULL
)
#> Phase, Search%, A-measure
#> [1] 1.0000000 0.0000000 0.8121212
#> [1] 1.0000000 10.0000000 0.8121212
#> [1] 1.0000000 20.0000000 0.8121212
#> [1] 1.0000000 30.0000000 0.8121212
#> [1] 1.0000000 40.0000000 0.8121212
#> [1] 1.0000000 50.0000000 0.8121212
#> [1] 1.0000000 60.0000000 0.8121212
#> [1] 1.0000000 70.0000000 0.8121212
#> [1] 1.0000000 80.0000000 0.8121212
#> [1] 1.0000000 90.0000000 0.8121212
#> [1] 1.0000000 100.0000000 0.8121212
#> [1] 0.8121212 0.8121212 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
#> [8] 0.0000000 0.0000000 0.0000000
#> 3 rows by 1 column
#> Phase, Search%, A-measure
#> [1] 2.000000 0.000000 0.944703
#> [1] 2.0000000 10.0000000 0.8121212
#> [1] 2.0000000 20.0000000 0.8121212
#> [1] 2.0000000 30.0000000 0.8121212
#> [1] 2.0000000 40.0000000 0.8121212
#> [1] 2.0000000 50.0000000 0.8121212
#> [1] 2.0000000 60.0000000 0.8121212
#> [1] 2.0000000 70.0000000 0.8121212
#> [1] 2.0000000 80.0000000 0.8121212
#> [1] 2.0000000 90.0000000 0.8121212
#> [1] 2.0000000 100.0000000 0.8121212
#> [1] 0.8121212 0.8121212 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 C 3 1 1 1
#> 2 KE24ILR-BW-ST01-00002 Shangi 5 2 1 1
#> 3 KE24ILR-BW-ST01-00003 D 4 3 1 1
#> 4 KE24ILR-BW-ST01-00004 A 1 1 2 1
#> 5 KE24ILR-BW-ST01-00005 Sherekea 6 2 2 1
#> 6 KE24ILR-BW-ST01-00006 B 2 3 2 1