Skip to contents

Randomly generates a spatial un-replicated optimized arrangement design, where the distance between checks is maximized in such a way that each row and column have control plots. Note that design generation needs the dimension of the field (number of rows and columns).

Usage

optimized_arrangement(
  nrows = NULL,
  ncols = NULL,
  lines = NULL,
  amountChecks = NULL,
  checks = NULL,
  planter = "serpentine",
  l = 1,
  plotNumber = 101,
  seed = NULL,
  exptName = NULL,
  locationNames = NULL,
  optim = TRUE,
  data = NULL
)

Arguments

nrows

Number of rows in the field.

ncols

Number of columns in the field.

lines

Number of genotypes, experimental lines or treatments.

amountChecks

Integer with the amount total of checks or a numeric vector with the replicates of each check label.

checks

Number of genotypes as checks.

planter

Option for serpentine or cartesian arrangement. By default planter = 'serpentine'.

l

Number of locations. By default l = 1.

plotNumber

Numeric vector with the starting plot number for each location. By default plotNumber = 101.

seed

(optional) Real number that specifies the starting seed to obtain reproducible designs.

exptName

(optional) Name of the experiment.

locationNames

(optional) Name for each location.

optim

By default optim = TRUE.

data

(optional) Data frame with 3 columns: ENTRY | NAME | REPS.

Value

A list with five elements.

  • infoDesign is a list with information on the design parameters.

  • layoutRandom is a matrix with the randomization layout.

  • plotNumber is a matrix with the layout plot number.

  • dataEntry is a data frame with the data input.

  • genEntries is a list with the entries for replicated and no replicated part.

  • fieldBook is a data frame with field book design. This includes the index (Row, Column).

References

Clarke, G. P. Y., & Stefanova, K. T. (2011). Optimal design for early-generation plant breeding trials with unreplicated or partially replicated test lines. Australian & New Zealand Journal of Statistics, 53(4), 461–480.

Author

Didier Murillo [aut], Salvador Gezan [aut], Ana Heilman [ctb], Thomas Walk [ctb], Johan Aparicio [ctb], Richard Horsley [ctb]

Examples

# Example 1: Generates a spatial unreplicated optimized arrangement design in one location
# with 108 genotypes + 12 check plots (4 checks) for a field with dimension 10 rows x 12 cols.
OptimAd1 <- optimized_arrangement(
  nrows = 10, 
  ncols = 12, 
  lines = 108, 
  amountChecks = 12, 
  checks = 1:4,
  planter = "cartesian", 
  plotNumber = 101,
  seed = 14,
  exptName = "20RW1",
  locationNames = "CASSELTON"
 )
#> [1] 120
OptimAd1$infoDesign
#> $rows
#> [1] 10
#> 
#> $columns
#> [1] 12
#> 
#> $treatments
#> [1] 108
#> 
#> $checks
#> [1] 4
#> 
#> $entry_checks
#> [1] 1 2 3 4
#> 
#> $rep_checks
#> [1] 3 3 3 3
#> 
#> $locations
#> [1] 1
#> 
#> $planter
#> [1] "cartesian"
#> 
#> $seed
#> [1] 14
#> 
#> $id_design
#> [1] 16
#> 
OptimAd1$layoutRandom
#> [[1]]
#>       Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12
#> Row10   69  106   64    4   28  109    6   41    8    25    34   104
#> Row9    80   47   55  112   22    2   89   68   15    95    98    61
#> Row8   110    4   48   26   20   66   35   46   81     1    18    76
#> Row7     5  111   65   36   92   54   38   87  100    84     3    75
#> Row6    14   59   40   19    1   63   91    7   10   105    29    30
#> Row5    17   67    3   58   11   94   13   57   99    12   102    16
#> Row4    73   56   50  108   74  101   27   43    2    79    83    90
#> Row3     4   71   37   51  107   21   93    3   70    86    42    39
#> Row2    85   44   24   82   96   53  103   23   77    33     9     1
#> Row1    31   32   60   52   78   72    2   62   45    49    97    88
#> 
OptimAd1$plotNumber
#> [[1]]
#>       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
#>  [1,]  209  210  211  212  213  214  215  216  217   218   219   220
#>  [2,]  197  198  199  200  201  202  203  204  205   206   207   208
#>  [3,]  185  186  187  188  189  190  191  192  193   194   195   196
#>  [4,]  173  174  175  176  177  178  179  180  181   182   183   184
#>  [5,]  161  162  163  164  165  166  167  168  169   170   171   172
#>  [6,]  149  150  151  152  153  154  155  156  157   158   159   160
#>  [7,]  137  138  139  140  141  142  143  144  145   146   147   148
#>  [8,]  125  126  127  128  129  130  131  132  133   134   135   136
#>  [9,]  113  114  115  116  117  118  119  120  121   122   123   124
#> [10,]  101  102  103  104  105  106  107  108  109   110   111   112
#> 
head(OptimAd1$fieldBook,12)
#>    ID  EXPT  LOCATION YEAR PLOT ROW COLUMN CHECKS ENTRY TREATMENT
#> 1   1 20RW1 CASSELTON 2022  101   1      1      0    31       G31
#> 2   2 20RW1 CASSELTON 2022  102   1      2      0    32       G32
#> 3   3 20RW1 CASSELTON 2022  103   1      3      0    60       G60
#> 4   4 20RW1 CASSELTON 2022  104   1      4      0    52       G52
#> 5   5 20RW1 CASSELTON 2022  105   1      5      0    78       G78
#> 6   6 20RW1 CASSELTON 2022  106   1      6      0    72       G72
#> 7   7 20RW1 CASSELTON 2022  107   1      7      2     2       CH2
#> 8   8 20RW1 CASSELTON 2022  108   1      8      0    62       G62
#> 9   9 20RW1 CASSELTON 2022  109   1      9      0    45       G45
#> 10 10 20RW1 CASSELTON 2022  110   1     10      0    49       G49
#> 11 11 20RW1 CASSELTON 2022  111   1     11      0    97       G97
#> 12 12 20RW1 CASSELTON 2022  112   1     12      0    88       G88
                  
# Example 2: Generates a spatial unreplicated optimized arrangement design in one location
# with 200 genotypes + 20 check plots (4 checks) for a field with dimension 10 rows x 22 cols.
# As example, we set up the data option with the entries list.
checks <- 4
list_checks <- paste("CH", 1:checks, sep = "")
treatments <- paste("G", 5:204, sep = "")
REPS <- c(5, 5, 5, 5, rep(1, 200))
treatment_list <- data.frame(list(ENTRY = 1:204, NAME = c(list_checks, treatments), REPS = REPS))
head(treatment_list, 12) 
#>    ENTRY NAME REPS
#> 1      1  CH1    5
#> 2      2  CH2    5
#> 3      3  CH3    5
#> 4      4  CH4    5
#> 5      5   G5    1
#> 6      6   G6    1
#> 7      7   G7    1
#> 8      8   G8    1
#> 9      9   G9    1
#> 10    10  G10    1
#> 11    11  G11    1
#> 12    12  G12    1
tail(treatment_list, 12)
#>     ENTRY NAME REPS
#> 193   193 G193    1
#> 194   194 G194    1
#> 195   195 G195    1
#> 196   196 G196    1
#> 197   197 G197    1
#> 198   198 G198    1
#> 199   199 G199    1
#> 200   200 G200    1
#> 201   201 G201    1
#> 202   202 G202    1
#> 203   203 G203    1
#> 204   204 G204    1
OptimAd2 <- optimized_arrangement(
  nrows = 10, 
  ncols = 22, 
  planter = "serpentine", 
  plotNumber = 101,
  seed = 120,
  exptName = "20YWA2",
  locationNames = "MINOT",
  data = treatment_list
)
#> [1] 220
OptimAd2$infoDesign
#> $rows
#> [1] 10
#> 
#> $columns
#> [1] 22
#> 
#> $treatments
#> [1] 200
#> 
#> $checks
#> [1] 4
#> 
#> $entry_checks
#> [1] 1 2 3 4
#> 
#> $rep_checks
#> [1] 5 5 5 5
#> 
#> $locations
#> [1] 1
#> 
#> $planter
#> [1] "serpentine"
#> 
#> $seed
#> [1] 120
#> 
#> $id_design
#> [1] 16
#> 
OptimAd2$layoutRandom
#> [[1]]
#>       Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12 Col13
#> Row10   75  141  179  140   34  197   70   31    3    91   186     1   132
#> Row9   162  154   48   15    1  125   62  109   13    85   121   110    46
#> Row8   142   33  190   36  135  182   63  111   79   108     2    83     9
#> Row7    69  171   88   44   20  148  167  103  122    94   101   164     3
#> Row6    57   22  126   50  106  202    3  159  176    82     8   189    73
#> Row5   193   90    4  130  187  124  178   98   21   170   200   181    89
#> Row4     4  174  147  138   42  151  139  149  185   117   153    71    64
#> Row3   136    5   60   29  112   12   68    2   38   161   177    39   119
#> Row2    99   43  144    3  165   18  168   77  114    84   203   143    59
#> Row1   123    2   27  133  118   54   67   47   96     2    24   120   102
#>       Col14 Col15 Col16 Col17 Col18 Col19 Col20 Col21 Col22
#> Row10    74    26    58    11     6   158   180   194   113
#> Row9    196   166    37   172    95     3    92    80   145
#> Row8    155   107     4    76   129    10   169   104   173
#> Row7     49    51    53   195     7    65    81     4   199
#> Row6    127    40    45    61     4    17    25   184    32
#> Row5    201   175   128     1   198   163   204   152   160
#> Row4    134   146   192   105   157    56     1    35    19
#> Row3    183    78   100    41    28    97   137   188     1
#> Row2    116     2    72    66   156    93    16   191    86
#> Row1     30   131    23    52    55   150    87    14   115
#> 
OptimAd2$plotNumber
#> [[1]]
#>       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
#>  [1,]  320  319  318  317  316  315  314  313  312   311   310   309   308
#>  [2,]  277  278  279  280  281  282  283  284  285   286   287   288   289
#>  [3,]  276  275  274  273  272  271  270  269  268   267   266   265   264
#>  [4,]  233  234  235  236  237  238  239  240  241   242   243   244   245
#>  [5,]  232  231  230  229  228  227  226  225  224   223   222   221   220
#>  [6,]  189  190  191  192  193  194  195  196  197   198   199   200   201
#>  [7,]  188  187  186  185  184  183  182  181  180   179   178   177   176
#>  [8,]  145  146  147  148  149  150  151  152  153   154   155   156   157
#>  [9,]  144  143  142  141  140  139  138  137  136   135   134   133   132
#> [10,]  101  102  103  104  105  106  107  108  109   110   111   112   113
#>       [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22]
#>  [1,]   307   306   305   304   303   302   301   300   299
#>  [2,]   290   291   292   293   294   295   296   297   298
#>  [3,]   263   262   261   260   259   258   257   256   255
#>  [4,]   246   247   248   249   250   251   252   253   254
#>  [5,]   219   218   217   216   215   214   213   212   211
#>  [6,]   202   203   204   205   206   207   208   209   210
#>  [7,]   175   174   173   172   171   170   169   168   167
#>  [8,]   158   159   160   161   162   163   164   165   166
#>  [9,]   131   130   129   128   127   126   125   124   123
#> [10,]   114   115   116   117   118   119   120   121   122
#> 
head(OptimAd2$fieldBook,12)
#>    ID   EXPT LOCATION YEAR PLOT ROW COLUMN CHECKS ENTRY TREATMENT
#> 1   1 20YWA2    MINOT 2022  101   1      1      0   123      G123
#> 2   2 20YWA2    MINOT 2022  102   1      2      2     2       CH2
#> 3   3 20YWA2    MINOT 2022  103   1      3      0    27       G27
#> 4   4 20YWA2    MINOT 2022  104   1      4      0   133      G133
#> 5   5 20YWA2    MINOT 2022  105   1      5      0   118      G118
#> 6   6 20YWA2    MINOT 2022  106   1      6      0    54       G54
#> 7   7 20YWA2    MINOT 2022  107   1      7      0    67       G67
#> 8   8 20YWA2    MINOT 2022  108   1      8      0    47       G47
#> 9   9 20YWA2    MINOT 2022  109   1      9      0    96       G96
#> 10 10 20YWA2    MINOT 2022  110   1     10      2     2       CH2
#> 11 11 20YWA2    MINOT 2022  111   1     11      0    24       G24
#> 12 12 20YWA2    MINOT 2022  112   1     12      0   120      G120