Skip to contents

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    9   19   28   25
#> [2,]   17   11    1   21    2    5
#> [3,]   32   10   22    3   33    6
#> [4,]    4   23   30   24   27   12
#> [5,]   14   34   20   35   16   26
#> [6,]    8   36   13   29    7   31
#> 
#> $Loc_Loc1$rep2
#>      [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,]   17   33   29   22    5    3
#> [2,]    6   30   12   36   10   34
#> [3,]   27    4   13   16    9   26
#> [4,]   11   21   18   19    7    1
#> [5,]   24   15    2    8   35   14
#> [6,]   20   25   23   31   32   28
#> 
#> $Loc_Loc1$rep3
#>      [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,]   30    4   20    9   26   13
#> [2,]   17    2   12   34   32   25
#> [3,]   23   19   36   18   29    3
#> [4,]    5   10   14   31   15    8
#> [5,]   24    6   33   27   22   28
#> [6,]   16    1   35   21    7   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     9       G-9
#> 4   4     Loc1  104   1   1      4    19      G-19
#> 5   5     Loc1  105   1   1      5    28      G-28
#> 6   6     Loc1  106   1   1      6    25      G-25
#> 7   7     Loc1  107   1   2      1    17      G-17
#> 8   8     Loc1  108   1   2      2    11      G-11
#> 9   9     Loc1  109   1   2      3     1       G-1
#> 10 10     Loc1  110   1   2      4    21      G-21
#> 11 11     Loc1  111   1   2      5     2       G-2
#> 12 12     Loc1  112   1   2      6     5       G-5

# 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-10" "ND-30" "ND-26" "ND-5"  "ND-15" "ND-8" 
#> [2,] "ND-11" "ND-20" "ND-21" "ND-7"  "ND-3"  "ND-17"
#> [3,] "ND-23" "ND-19" "ND-13" "ND-27" "ND-28" "ND-4" 
#> [4,] "ND-14" "ND-9"  "ND-29" "ND-12" "ND-18" "ND-1" 
#> [5,] "ND-2"  "ND-6"  "ND-24" "ND-25" "ND-22" "ND-16"
#> 
#> $Loc_1$rep2
#>      [,1]    [,2]    [,3]    [,4]    [,5]    [,6]   
#> [1,] "ND-14" "ND-8"  "ND-21" "ND-15" "ND-18" "ND-5" 
#> [2,] "ND-6"  "ND-20" "ND-25" "ND-10" "ND-13" "ND-23"
#> [3,] "ND-3"  "ND-11" "ND-22" "ND-7"  "ND-9"  "ND-28"
#> [4,] "ND-17" "ND-24" "ND-30" "ND-4"  "ND-12" "ND-19"
#> [5,] "ND-29" "ND-27" "ND-1"  "ND-26" "ND-2"  "ND-16"
#> 
#> $Loc_1$rep3
#>      [,1]    [,2]    [,3]    [,4]    [,5]    [,6]   
#> [1,] "ND-12" "ND-27" "ND-24" "ND-15" "ND-28" "ND-8" 
#> [2,] "ND-21" "ND-4"  "ND-14" "ND-25" "ND-17" "ND-22"
#> [3,] "ND-10" "ND-30" "ND-5"  "ND-19" "ND-20" "ND-26"
#> [4,] "ND-6"  "ND-2"  "ND-1"  "ND-29" "ND-13" "ND-23"
#> [5,] "ND-16" "ND-3"  "ND-18" "ND-11" "ND-7"  "ND-9" 
#> 
#> 
head(rowcold2$fieldBook,12)
#>    ID LOCATION PLOT REP ROW COLUMN ENTRY TREATMENT
#> 1   1        1  101   1   1      1    10     ND-10
#> 2   2        1  102   1   1      2    30     ND-30
#> 3   3        1  103   1   1      3    26     ND-26
#> 4   4        1  104   1   1      4     5      ND-5
#> 5   5        1  105   1   1      5    15     ND-15
#> 6   6        1  106   1   1      6     8      ND-8
#> 7   7        1  107   1   2      1    11     ND-11
#> 8   8        1  108   1   2      2    20     ND-20
#> 9   9        1  109   1   2      3    21     ND-21
#> 10 10        1  110   1   2      4     7      ND-7
#> 11 11        1  111   1   2      5     3      ND-3
#> 12 12        1  112   1   2      6    17     ND-17