It randomly generates a resolvable row-column designs (RowColD). Note that design optimization is only done at the level of rows and not columns; hence, design is suboptimal. The randomization can be done across locations.
Usage
row_column(
t = NULL,
nrows = NULL,
r = NULL,
l = 1,
plotNumber = 101,
locationNames = NULL,
seed = NULL,
data = NULL
)
Arguments
- t
Number of treatments.
- nrows
Number of rows of a full resolvable replicate.
- r
Number of blocks (full resolvable replicates).
- l
Number of locations. By default
l = 1
.- plotNumber
Numeric vector with the starting plot number for each location. By default
plotNumber = 101
.- locationNames
(optional) Names for each location.
- seed
(optional) Real number that specifies the starting seed to obtain reproducible designs.
- data
(optional) Data frame with label list of treatments
Value
A list with four elements.
infoDesign
is a list with information on the design parameters.resolvableBlocks
a list with the resolvable row columns blocks.concurrence
is the concurrence matrix.fieldBook
is a data frame with the row-column field book.
References
Edmondson., R. N. (2021). blocksdesign: Nested and crossed block designs for factorial and unstructured treatment sets. https://CRAN.R-project.org/package=blocksdesign
Author
Didier Murillo [aut], Salvador Gezan [aut], Ana Heilman [ctb], Thomas Walk [ctb], Johan Aparicio [ctb], Richard Horsley [ctb]
Examples
# Example 1: Generates a row-column design with 3 full blocks and 36 treatments
# and 6 rows. This for one location.
rowcold1 <- row_column(t = 36, nrows = 6, r = 3, l = 1,
plotNumber= 101,
locationNames = "Loc1",
seed = 21)
rowcold1$infoDesign
#> $rows
#> [1] 6
#>
#> $columns
#> [1] 6
#>
#> $reps
#> [1] 3
#>
#> $treatments
#> [1] 36
#>
#> $locations
#> [1] 1
#>
#> $location_names
#> [1] "Loc1"
#>
#> $seed
#> [1] 21
#>
#> $id_design
#> [1] 9
#>
rowcold1$resolvableBlocks
#> $Loc_Loc1
#> $Loc_Loc1$rep1
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 18 15 6 13 25 35
#> [2,] 33 7 23 29 30 14
#> [3,] 9 8 24 27 10 2
#> [4,] 12 17 36 16 19 21
#> [5,] 1 34 4 32 22 26
#> [6,] 28 11 5 20 3 31
#>
#> $Loc_Loc1$rep2
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 1 14 33 12 9 4
#> [2,] 26 5 20 23 7 31
#> [3,] 3 8 17 29 36 25
#> [4,] 32 16 10 2 13 18
#> [5,] 24 28 6 11 35 27
#> [6,] 34 19 21 30 22 15
#>
#> $Loc_Loc1$rep3
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 14 10 16 9 28 35
#> [2,] 7 36 21 2 30 19
#> [3,] 12 31 23 15 13 24
#> [4,] 25 8 22 5 4 33
#> [5,] 3 29 34 32 26 27
#> [6,] 20 1 18 6 17 11
#>
#>
head(rowcold1$fieldBook,12)
#> ID LOCATION PLOT REP ROW COLUMN ENTRY TREATMENT
#> 1 1 Loc1 101 1 1 1 18 G-18
#> 2 2 Loc1 102 1 1 2 15 G-15
#> 3 3 Loc1 103 1 1 3 6 G-6
#> 4 4 Loc1 104 1 1 4 13 G-13
#> 5 5 Loc1 105 1 1 5 25 G-25
#> 6 6 Loc1 106 1 1 6 35 G-35
#> 7 7 Loc1 107 1 2 1 33 G-33
#> 8 8 Loc1 108 1 2 2 7 G-7
#> 9 9 Loc1 109 1 2 3 23 G-23
#> 10 10 Loc1 110 1 2 4 29 G-29
#> 11 11 Loc1 111 1 2 5 30 G-30
#> 12 12 Loc1 112 1 2 6 14 G-14
# Example 2: Generates a row-column design with 3 full blocks and 30 treatments
# and 5 rows, for one location.
# In this case, we show how to use the option data.
treatments <- paste("ND-", 1:30, sep = "")
ENTRY <- 1:30
treatment_list <- data.frame(list(ENTRY = ENTRY, TREATMENT = treatments))
head(treatment_list)
#> ENTRY TREATMENT
#> 1 1 ND-1
#> 2 2 ND-2
#> 3 3 ND-3
#> 4 4 ND-4
#> 5 5 ND-5
#> 6 6 ND-6
rowcold2 <- row_column(t = 30, nrows = 5, r = 3, l = 1,
plotNumber= c(101,1001),
locationNames = c("A", "B"),
seed = 15,
data = treatment_list)
#> Warning: Since plotNumber was missing, it was set up to default values.
#> Warning: Length of plot numbers is larger than number of locations.
rowcold2$infoDesign
#> $rows
#> [1] 5
#>
#> $columns
#> [1] 6
#>
#> $reps
#> [1] 3
#>
#> $treatments
#> [1] 30
#>
#> $locations
#> [1] 1
#>
#> $location_names
#> [1] 1
#>
#> $seed
#> [1] 15
#>
#> $id_design
#> [1] 9
#>
rowcold2$resolvableBlocks
#> $Loc_1
#> $Loc_1$rep1
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] "ND-9" "ND-19" "ND-24" "ND-27" "ND-6" "ND-25"
#> [2,] "ND-22" "ND-7" "ND-10" "ND-21" "ND-14" "ND-13"
#> [3,] "ND-29" "ND-5" "ND-20" "ND-30" "ND-16" "ND-8"
#> [4,] "ND-2" "ND-15" "ND-17" "ND-11" "ND-28" "ND-26"
#> [5,] "ND-1" "ND-3" "ND-4" "ND-23" "ND-12" "ND-18"
#>
#> $Loc_1$rep2
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] "ND-18" "ND-4" "ND-24" "ND-5" "ND-3" "ND-8"
#> [2,] "ND-30" "ND-12" "ND-13" "ND-17" "ND-22" "ND-11"
#> [3,] "ND-19" "ND-29" "ND-9" "ND-28" "ND-26" "ND-10"
#> [4,] "ND-20" "ND-7" "ND-14" "ND-1" "ND-6" "ND-15"
#> [5,] "ND-2" "ND-21" "ND-27" "ND-25" "ND-23" "ND-16"
#>
#> $Loc_1$rep3
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] "ND-22" "ND-6" "ND-23" "ND-25" "ND-1" "ND-26"
#> [2,] "ND-16" "ND-27" "ND-8" "ND-3" "ND-19" "ND-14"
#> [3,] "ND-30" "ND-17" "ND-29" "ND-10" "ND-11" "ND-4"
#> [4,] "ND-24" "ND-18" "ND-28" "ND-21" "ND-12" "ND-15"
#> [5,] "ND-5" "ND-7" "ND-20" "ND-9" "ND-13" "ND-2"
#>
#>
head(rowcold2$fieldBook,12)
#> ID LOCATION PLOT REP ROW COLUMN ENTRY TREATMENT
#> 1 1 1 101 1 1 1 9 ND-9
#> 2 2 1 102 1 1 2 19 ND-19
#> 3 3 1 103 1 1 3 24 ND-24
#> 4 4 1 104 1 1 4 27 ND-27
#> 5 5 1 105 1 1 5 6 ND-6
#> 6 6 1 106 1 1 6 25 ND-25
#> 7 7 1 107 1 2 1 22 ND-22
#> 8 8 1 108 1 2 2 7 ND-7
#> 9 9 1 109 1 2 3 10 ND-10
#> 10 10 1 110 1 2 4 21 ND-21
#> 11 11 1 111 1 2 5 14 ND-14
#> 12 12 1 112 1 2 6 13 ND-13