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

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