Plotting Designs from FielDHub Package

Jens Harbers

2024-01-16

Usage of the package

This chapter shows the usage of the package and the underlying functions. As factorial experiments are omnipresent in all science and technology fields, a factorial ab-design will be used as an example. Although some parameters are worth for agriculture only, most other are useful for every user.

Unlike the usual presentation approach, I deliberately inserted the output of the ‘FielDHub’ functions into the vignette and executed each function individually. This allows interested users to directly adopt the code.

For ‘agricolaeplotr’, it is necessary to plot each location individually, while ‘FielDHub’ offers the option to create multiple locations simultaneously.

To illustrate the similarity of both plots, I have juxtaposed both versions.

Load the package

use the following command to load the package after installation. The three packages below ‘agricolaeplotr’ are only needed for the examples.

library("agricolaeplotr")
library("FielDHub")
library("ggplot2")

Example 1: Randomized Complete Block Design (RCBD)

example("RCBD")
## 
## RCBD> # Example 1: Generates a RCBD design with 3 blocks and 20 treatments across 3 locations.
## RCBD> rcbd1 <- RCBD(t = LETTERS[1:20], reps = 5, l = 3, 
## RCBD+               plotNumber = c(101,1001, 2001), 
## RCBD+               continuous = TRUE,
## RCBD+               planter = "serpentine", 
## RCBD+               seed = 1020, 
## RCBD+               locationNames = c("FARGO", "MINOT", "CASSELTON"))
## 
## RCBD> rcbd1$infoDesign                  
## $blocks
## [1] 5
## 
## $number.of.treatments
## [1] 20
## 
## $treatments
##  [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S"
## [20] "T"
## 
## $locations
## [1] 3
## 
## $plotNumber
##  [1]  101  201  301  401  501 1001 1101 1201 1301 1401 2001 2101 2201 2301 2401
## 
## $locationNames
## [1] "FARGO"     "MINOT"     "CASSELTON"
## 
## $seed
## [1] 1020
## 
## $id_design
## [1] 2
## 
## 
## RCBD> rcbd1$layoutRandom
## $Loc_FARGO
##      Block --Treatments--                           
## [1,] "1"   "P R L T E A J O M C K F I Q G D S H N B"
## [2,] "2"   "Q H G M F D L P E B J N A I K C T R O S"
## [3,] "3"   "R B G K H E S C F D I T P N Q M A O J L"
## [4,] "4"   "M I T B N G O J Q C A L P E S R D K H F"
## [5,] "5"   "M C Q O E H I A P S R L J G F B T D K N"
## 
## $Loc_MINOT
##      Block --Treatments--                           
## [1,] "1"   "F O C A G D L B I S P T H K M E N R Q J"
## [2,] "2"   "Q H K A G D E M N O C S J I T L P F B R"
## [3,] "3"   "B K D L O E A R F S I P G T C Q J N M H"
## [4,] "4"   "C P L O B K E H Q G N A T R J F S M D I"
## [5,] "5"   "G S D B H L Q K A P E J T R I C O F M N"
## 
## $Loc_CASSELTON
##      Block --Treatments--                           
## [1,] "1"   "P G T E L O K H D N S C M I A J Q R B F"
## [2,] "2"   "C D L F A T I G S O B J M E R P H N Q K"
## [3,] "3"   "C G K N B A L Q I F D H J M O P S T E R"
## [4,] "4"   "E L H D F J A T S N B G Q M I O P C K R"
## [5,] "5"   "T I M A H K E C Q L D J R B G S N O F P"
## 
## 
## RCBD> rcbd1$plotNumber
## $Loc_FARGO
##      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
## [1,]  101  102  103  104  105  106  107  108  109   110   111   112   113   114
## [2,]  140  139  138  137  136  135  134  133  132   131   130   129   128   127
## [3,]  141  142  143  144  145  146  147  148  149   150   151   152   153   154
## [4,]  180  179  178  177  176  175  174  173  172   171   170   169   168   167
## [5,]  181  182  183  184  185  186  187  188  189   190   191   192   193   194
##      [,15] [,16] [,17] [,18] [,19] [,20]
## [1,]   115   116   117   118   119   120
## [2,]   126   125   124   123   122   121
## [3,]   155   156   157   158   159   160
## [4,]   166   165   164   163   162   161
## [5,]   195   196   197   198   199   200
## 
## $Loc_MINOT
##      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
## [1,] 1001 1002 1003 1004 1005 1006 1007 1008 1009  1010  1011  1012  1013  1014
## [2,] 1040 1039 1038 1037 1036 1035 1034 1033 1032  1031  1030  1029  1028  1027
## [3,] 1041 1042 1043 1044 1045 1046 1047 1048 1049  1050  1051  1052  1053  1054
## [4,] 1080 1079 1078 1077 1076 1075 1074 1073 1072  1071  1070  1069  1068  1067
## [5,] 1081 1082 1083 1084 1085 1086 1087 1088 1089  1090  1091  1092  1093  1094
##      [,15] [,16] [,17] [,18] [,19] [,20]
## [1,]  1015  1016  1017  1018  1019  1020
## [2,]  1026  1025  1024  1023  1022  1021
## [3,]  1055  1056  1057  1058  1059  1060
## [4,]  1066  1065  1064  1063  1062  1061
## [5,]  1095  1096  1097  1098  1099  1100
## 
## $Loc_CASSELTON
##      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
## [1,] 2001 2002 2003 2004 2005 2006 2007 2008 2009  2010  2011  2012  2013  2014
## [2,] 2040 2039 2038 2037 2036 2035 2034 2033 2032  2031  2030  2029  2028  2027
## [3,] 2041 2042 2043 2044 2045 2046 2047 2048 2049  2050  2051  2052  2053  2054
## [4,] 2080 2079 2078 2077 2076 2075 2074 2073 2072  2071  2070  2069  2068  2067
## [5,] 2081 2082 2083 2084 2085 2086 2087 2088 2089  2090  2091  2092  2093  2094
##      [,15] [,16] [,17] [,18] [,19] [,20]
## [1,]  2015  2016  2017  2018  2019  2020
## [2,]  2026  2025  2024  2023  2022  2021
## [3,]  2055  2056  2057  2058  2059  2060
## [4,]  2066  2065  2064  2063  2062  2061
## [5,]  2095  2096  2097  2098  2099  2100
## 
## 
## RCBD> head(rcbd1$fieldBook)
##   ID LOCATION PLOT REP TREATMENT
## 1  1    FARGO  101   1         P
## 2  2    FARGO  102   1         R
## 3  3    FARGO  103   1         L
## 4  4    FARGO  104   1         T
## 5  5    FARGO  105   1         E
## 6  6    FARGO  106   1         A
## 
## RCBD> # Example 2: Generates a RCBD design with 6 blocks and 18 treatments in one location.
## RCBD> # In this case, we show how to use the option data.
## RCBD> treatments <- paste("ND-", 1:18, sep = "")
## 
## RCBD> treatment_list <- data.frame(list(TREATMENT = treatments))
## 
## RCBD> head(treatment_list)
##   TREATMENT
## 1      ND-1
## 2      ND-2
## 3      ND-3
## 4      ND-4
## 5      ND-5
## 6      ND-6
## 
## RCBD> rcbd2 <- RCBD(reps = 6, l = 1, 
## RCBD+               plotNumber = 101, 
## RCBD+               continuous = FALSE, 
## RCBD+               planter = "serpentine", 
## RCBD+               seed = 13, 
## RCBD+               locationNames = "IBAGUE",
## RCBD+               data = treatment_list)
## 
## RCBD> rcbd2$infoDesign                  
## $blocks
## [1] 6
## 
## $number.of.treatments
## [1] 18
## 
## $treatments
##  [1] "ND-1"  "ND-2"  "ND-3"  "ND-4"  "ND-5"  "ND-6"  "ND-7"  "ND-8"  "ND-9" 
## [10] "ND-10" "ND-11" "ND-12" "ND-13" "ND-14" "ND-15" "ND-16" "ND-17" "ND-18"
## 
## $locations
## [1] 1
## 
## $plotNumber
## [1] 101 201 301 401 501 601
## 
## $locationNames
## [1] "IBAGUE"
## 
## $seed
## [1] 13
## 
## $id_design
## [1] 2
## 
## 
## RCBD> rcbd2$layoutRandom
## $Loc_IBAGUE
##      Block
## [1,] "1"  
## [2,] "2"  
## [3,] "3"  
## [4,] "4"  
## [5,] "5"  
## [6,] "6"  
##      --Treatments--                                                                                      
## [1,] "ND-3 ND-5 ND-10 ND-13 ND-6 ND-14 ND-4 ND-8 ND-18 ND-1 ND-11 ND-2 ND-17 ND-12 ND-9 ND-7 ND-16 ND-15"
## [2,] "ND-15 ND-17 ND-12 ND-1 ND-11 ND-4 ND-8 ND-7 ND-5 ND-3 ND-14 ND-9 ND-10 ND-13 ND-2 ND-6 ND-18 ND-16"
## [3,] "ND-17 ND-12 ND-8 ND-14 ND-10 ND-6 ND-7 ND-18 ND-2 ND-1 ND-13 ND-9 ND-11 ND-15 ND-16 ND-3 ND-4 ND-5"
## [4,] "ND-14 ND-13 ND-16 ND-1 ND-8 ND-9 ND-15 ND-6 ND-7 ND-12 ND-10 ND-18 ND-11 ND-4 ND-3 ND-5 ND-2 ND-17"
## [5,] "ND-14 ND-11 ND-9 ND-4 ND-1 ND-16 ND-3 ND-8 ND-5 ND-7 ND-10 ND-18 ND-12 ND-6 ND-2 ND-15 ND-13 ND-17"
## [6,] "ND-3 ND-5 ND-17 ND-9 ND-6 ND-18 ND-1 ND-14 ND-12 ND-8 ND-4 ND-11 ND-15 ND-2 ND-10 ND-16 ND-13 ND-7"
## 
## 
## RCBD> rcbd2$plotNumber
## $Loc_IBAGUE
##      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
## [1,]  101  102  103  104  105  106  107  108  109   110   111   112   113   114
## [2,]  218  217  216  215  214  213  212  211  210   209   208   207   206   205
## [3,]  301  302  303  304  305  306  307  308  309   310   311   312   313   314
## [4,]  418  417  416  415  414  413  412  411  410   409   408   407   406   405
## [5,]  501  502  503  504  505  506  507  508  509   510   511   512   513   514
## [6,]  618  617  616  615  614  613  612  611  610   609   608   607   606   605
##      [,15] [,16] [,17] [,18]
## [1,]   115   116   117   118
## [2,]   204   203   202   201
## [3,]   315   316   317   318
## [4,]   404   403   402   401
## [5,]   515   516   517   518
## [6,]   604   603   602   601
## 
## 
## RCBD> head(rcbd2$fieldBook)
##   ID LOCATION PLOT REP TREATMENT
## 1  1   IBAGUE  101   1      ND-3
## 2  2   IBAGUE  102   1      ND-5
## 3  3   IBAGUE  103   1     ND-10
## 4  4   IBAGUE  104   1     ND-13
## 5  5   IBAGUE  105   1      ND-6
## 6  6   IBAGUE  106   1     ND-14
plt <- plot(rcbd2)

p <- full_control_positions(plt$field_book, "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT")
##      ID LOCATION PLOT ROW COLUMN REP TREATMENT
## 1     1   IBAGUE  101   1      1   1      ND-3
## 2     2   IBAGUE  102   1      2   1      ND-5
## 3     3   IBAGUE  103   1      3   1     ND-10
## 4     4   IBAGUE  104   1      4   1     ND-13
## 5     5   IBAGUE  105   1      5   1      ND-6
## 6     6   IBAGUE  106   1      6   1     ND-14
## 7     7   IBAGUE  112   2      1   1      ND-4
## 8     8   IBAGUE  111   2      2   1      ND-8
## 9     9   IBAGUE  110   2      3   1     ND-18
## 10   10   IBAGUE  109   2      4   1      ND-1
## 11   11   IBAGUE  108   2      5   1     ND-11
## 12   12   IBAGUE  107   2      6   1      ND-2
## 13   13   IBAGUE  113   3      1   1     ND-17
## 14   14   IBAGUE  114   3      2   1     ND-12
## 15   15   IBAGUE  115   3      3   1      ND-9
## 16   16   IBAGUE  116   3      4   1      ND-7
## 17   17   IBAGUE  117   3      5   1     ND-16
## 18   18   IBAGUE  118   3      6   1     ND-15
## 19   19   IBAGUE  206   4      1   2     ND-16
## 20   20   IBAGUE  205   4      2   2     ND-18
## 21   21   IBAGUE  204   4      3   2      ND-6
## 22   22   IBAGUE  203   4      4   2      ND-2
## 23   23   IBAGUE  202   4      5   2     ND-13
## 24   24   IBAGUE  201   4      6   2     ND-10
## 25   25   IBAGUE  207   5      1   2      ND-9
## 26   26   IBAGUE  208   5      2   2     ND-14
## 27   27   IBAGUE  209   5      3   2      ND-3
## 28   28   IBAGUE  210   5      4   2      ND-5
## 29   29   IBAGUE  211   5      5   2      ND-7
## 30   30   IBAGUE  212   5      6   2      ND-8
## 31   31   IBAGUE  218   6      1   2      ND-4
## 32   32   IBAGUE  217   6      2   2     ND-11
## 33   33   IBAGUE  216   6      3   2      ND-1
## 34   34   IBAGUE  215   6      4   2     ND-12
## 35   35   IBAGUE  214   6      5   2     ND-17
## 36   36   IBAGUE  213   6      6   2     ND-15
## 37   37   IBAGUE  301   7      1   3     ND-17
## 38   38   IBAGUE  302   7      2   3     ND-12
## 39   39   IBAGUE  303   7      3   3      ND-8
## 40   40   IBAGUE  304   7      4   3     ND-14
## 41   41   IBAGUE  305   7      5   3     ND-10
## 42   42   IBAGUE  306   7      6   3      ND-6
## 43   43   IBAGUE  312   8      1   3      ND-7
## 44   44   IBAGUE  311   8      2   3     ND-18
## 45   45   IBAGUE  310   8      3   3      ND-2
## 46   46   IBAGUE  309   8      4   3      ND-1
## 47   47   IBAGUE  308   8      5   3     ND-13
## 48   48   IBAGUE  307   8      6   3      ND-9
## 49   49   IBAGUE  313   9      1   3     ND-11
## 50   50   IBAGUE  314   9      2   3     ND-15
## 51   51   IBAGUE  315   9      3   3     ND-16
## 52   52   IBAGUE  316   9      4   3      ND-3
## 53   53   IBAGUE  317   9      5   3      ND-4
## 54   54   IBAGUE  318   9      6   3      ND-5
## 55   55   IBAGUE  406  10      1   4     ND-17
## 56   56   IBAGUE  405  10      2   4      ND-2
## 57   57   IBAGUE  404  10      3   4      ND-5
## 58   58   IBAGUE  403  10      4   4      ND-3
## 59   59   IBAGUE  402  10      5   4      ND-4
## 60   60   IBAGUE  401  10      6   4     ND-11
## 61   61   IBAGUE  407  11      1   4     ND-18
## 62   62   IBAGUE  408  11      2   4     ND-10
## 63   63   IBAGUE  409  11      3   4     ND-12
## 64   64   IBAGUE  410  11      4   4      ND-7
## 65   65   IBAGUE  411  11      5   4      ND-6
## 66   66   IBAGUE  412  11      6   4     ND-15
## 67   67   IBAGUE  418  12      1   4      ND-9
## 68   68   IBAGUE  417  12      2   4      ND-8
## 69   69   IBAGUE  416  12      3   4      ND-1
## 70   70   IBAGUE  415  12      4   4     ND-16
## 71   71   IBAGUE  414  12      5   4     ND-13
## 72   72   IBAGUE  413  12      6   4     ND-14
## 73   73   IBAGUE  501  13      1   5     ND-14
## 74   74   IBAGUE  502  13      2   5     ND-11
## 75   75   IBAGUE  503  13      3   5      ND-9
## 76   76   IBAGUE  504  13      4   5      ND-4
## 77   77   IBAGUE  505  13      5   5      ND-1
## 78   78   IBAGUE  506  13      6   5     ND-16
## 79   79   IBAGUE  512  14      1   5      ND-3
## 80   80   IBAGUE  511  14      2   5      ND-8
## 81   81   IBAGUE  510  14      3   5      ND-5
## 82   82   IBAGUE  509  14      4   5      ND-7
## 83   83   IBAGUE  508  14      5   5     ND-10
## 84   84   IBAGUE  507  14      6   5     ND-18
## 85   85   IBAGUE  513  15      1   5     ND-12
## 86   86   IBAGUE  514  15      2   5      ND-6
## 87   87   IBAGUE  515  15      3   5      ND-2
## 88   88   IBAGUE  516  15      4   5     ND-15
## 89   89   IBAGUE  517  15      5   5     ND-13
## 90   90   IBAGUE  518  15      6   5     ND-17
## 91   91   IBAGUE  606  16      1   6      ND-7
## 92   92   IBAGUE  605  16      2   6     ND-13
## 93   93   IBAGUE  604  16      3   6     ND-16
## 94   94   IBAGUE  603  16      4   6     ND-10
## 95   95   IBAGUE  602  16      5   6      ND-2
## 96   96   IBAGUE  601  16      6   6     ND-15
## 97   97   IBAGUE  607  17      1   6     ND-11
## 98   98   IBAGUE  608  17      2   6      ND-4
## 99   99   IBAGUE  609  17      3   6      ND-8
## 100 100   IBAGUE  610  17      4   6     ND-12
## 101 101   IBAGUE  611  17      5   6     ND-14
## 102 102   IBAGUE  612  17      6   6      ND-1
## 103 103   IBAGUE  618  18      1   6     ND-18
## 104 104   IBAGUE  617  18      2   6      ND-6
## 105 105   IBAGUE  616  18      3   6      ND-9
## 106 106   IBAGUE  615  18      4   6     ND-17
## 107 107   IBAGUE  614  18      5   6      ND-5
## 108 108   IBAGUE  613  18      6   6      ND-3
p

# Example 2: Latin Square Design

latinSq1 <- latin_square(t = 4, reps = 2, plotNumber = 101, planter = "cartesian", seed = 1980)
plt <- plot(latinSq1)

p <- full_control_positions(plt$field_book, "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT")
##    ID LOCATION PLOT ROW COLUMN SQUARE ROW_SQ COLUMN_SQ TREATMENT
## 1   1        1  101   1      1      1  Row 1  Column 1        T1
## 2   2        1  102   1      2      1  Row 1  Column 2        T4
## 3   3        1  103   1      3      1  Row 1  Column 3        T2
## 4   4        1  104   1      4      1  Row 1  Column 4        T3
## 5   5        1  108   2      1      1  Row 2  Column 1        T3
## 6   6        1  107   2      2      1  Row 2  Column 2        T1
## 7   7        1  106   2      3      1  Row 2  Column 3        T4
## 8   8        1  105   2      4      1  Row 2  Column 4        T2
## 9   9        1  109   3      1      1  Row 3  Column 1        T4
## 10 10        1  110   3      2      1  Row 3  Column 2        T2
## 11 11        1  111   3      3      1  Row 3  Column 3        T3
## 12 12        1  112   3      4      1  Row 3  Column 4        T1
## 13 13        1  116   4      1      1  Row 4  Column 1        T2
## 14 14        1  115   4      2      1  Row 4  Column 2        T3
## 15 15        1  114   4      3      1  Row 4  Column 3        T1
## 16 16        1  113   4      4      1  Row 4  Column 4        T4
## 17 17        1  201   5      1      2  Row 1  Column 1        T1
## 18 18        1  202   5      2      2  Row 1  Column 2        T3
## 19 19        1  203   5      3      2  Row 1  Column 3        T4
## 20 20        1  204   5      4      2  Row 1  Column 4        T2
## 21 21        1  208   6      1      2  Row 2  Column 1        T2
## 22 22        1  207   6      2      2  Row 2  Column 2        T4
## 23 23        1  206   6      3      2  Row 2  Column 3        T3
## 24 24        1  205   6      4      2  Row 2  Column 4        T1
## 25 25        1  209   7      1      2  Row 3  Column 1        T4
## 26 26        1  210   7      2      2  Row 3  Column 2        T1
## 27 27        1  211   7      3      2  Row 3  Column 3        T2
## 28 28        1  212   7      4      2  Row 3  Column 4        T3
## 29 29        1  216   8      1      2  Row 4  Column 1        T3
## 30 30        1  215   8      2      2  Row 4  Column 2        T2
## 31 31        1  214   8      3      2  Row 4  Column 3        T1
## 32 32        1  213   8      4      2  Row 4  Column 4        T4
p

# Example 3: Full Factorial Design

example("full_factorial")
## 
## fll_fc> # Example 1: Generates a full factorial with 3 factors each with 2 levels.
## fll_fc> # This in an RCBD arrangement with 3 reps.
## fll_fc> fullFact1 <- full_factorial(setfactors = c(2,2,2), reps = 3, l = 1, type = 2,
## fll_fc+                             plotNumber = 101,
## fll_fc+                             continuous = TRUE,
## fll_fc+                             planter = "serpentine",
## fll_fc+                             seed = 325,
## fll_fc+                             locationNames = "FARGO")
## 
## fll_fc> fullFact1$infoDesign
## $factors
## [1] "A" "B" "C"
## 
## $levels
## [1] 0 1 0 1 0 1
## 
## $runs
## [1] 8
## 
## $all_treatments
##   A B C
## 1 0 0 0
## 2 1 0 0
## 3 0 1 0
## 4 1 1 0
## 5 0 0 1
## 6 1 0 1
## 7 0 1 1
## 8 1 1 1
## 
## $reps
## [1] 3
## 
## $locations
## [1] 1
## 
## $location_names
## [1] "FARGO"
## 
## $kind
## [1] "RCBD"
## 
## $levels_each_factor
## [1] 2 2 2
## 
## $id_design
## [1] 4
## 
## 
## fll_fc> head(fullFact1$fieldBook,10)
##    ID LOCATION PLOT REP FACTOR_A FACTOR_B FACTOR_C TRT_COMB
## 1   1    FARGO  101   1        0        1        1    0*1*1
## 2   2    FARGO  102   1        1        1        1    1*1*1
## 3   3    FARGO  103   1        1        0        0    1*0*0
## 4   4    FARGO  104   1        0        1        0    0*1*0
## 5   5    FARGO  105   1        1        1        0    1*1*0
## 6   6    FARGO  106   1        1        0        1    1*0*1
## 7   7    FARGO  107   1        0        0        0    0*0*0
## 8   8    FARGO  108   1        0        0        1    0*0*1
## 16  9    FARGO  109   2        1        1        0    1*1*0
## 15 10    FARGO  110   2        0        0        0    0*0*0
## 
## fll_fc> # Example 2: Generates a full factorial with 3 factors and each with levels: 2,3,
## fll_fc> # and 2, respectively. In this case, we show how to use the option data
## fll_fc> FACTORS <- rep(c("A", "B", "C"), c(2,3,2))
## 
## fll_fc> LEVELS <- c("a0", "a1", "b0", "b1", "b2", "c0", "c1")
## 
## fll_fc> data_factorial <- data.frame(list(FACTOR = FACTORS, LEVEL = LEVELS))
## 
## fll_fc> print(data_factorial)
##   FACTOR LEVEL
## 1      A    a0
## 2      A    a1
## 3      B    b0
## 4      B    b1
## 5      B    b2
## 6      C    c0
## 7      C    c1
## 
## fll_fc> # This in an RCBD arrangement with 5 reps in 3 locations.
## fll_fc> fullFact2 <- full_factorial(setfactors = NULL, reps = 5, l = 3, type = 2,
## fll_fc+                             plotNumber = c(101,1001,2001),
## fll_fc+                             continuous = FALSE,
## fll_fc+                             planter = "serpentine",
## fll_fc+                             seed = 326,
## fll_fc+                             locationNames = c("Loc1","Loc2","Loc3"),
## fll_fc+                             data = data_factorial)
## 
## fll_fc> fullFact2$infoDesign
## $factors
## [1] "A" "B" "C"
## 
## $levels
## $levels[[1]]
## [1] "a0" "a1"
## 
## $levels[[2]]
## [1] "b0" "b1" "b2"
## 
## $levels[[3]]
## [1] "c0" "c1"
## 
## 
## $runs
## [1] 12
## 
## $all_treatments
##     A  B  C
## 1  a0 b0 c0
## 2  a1 b0 c0
## 3  a0 b1 c0
## 4  a1 b1 c0
## 5  a0 b2 c0
## 6  a1 b2 c0
## 7  a0 b0 c1
## 8  a1 b0 c1
## 9  a0 b1 c1
## 10 a1 b1 c1
## 11 a0 b2 c1
## 12 a1 b2 c1
## 
## $reps
## [1] 5
## 
## $locations
## [1] 3
## 
## $location_names
## [1] "Loc1" "Loc2" "Loc3"
## 
## $kind
## [1] "RCBD"
## 
## $levels_each_factor
## [1] 2 3 2
## 
## $id_design
## [1] 4
## 
## 
## fll_fc> head(fullFact2$fieldBook,10)
##    ID LOCATION PLOT REP FACTOR_A FACTOR_B FACTOR_C TRT_COMB
## 1   1     Loc1  101   1       a0       b1       c0 a0*b1*c0
## 2   2     Loc1  102   1       a1       b0       c1 a1*b0*c1
## 3   3     Loc1  103   1       a1       b2       c1 a1*b2*c1
## 4   4     Loc1  104   1       a0       b1       c1 a0*b1*c1
## 5   5     Loc1  105   1       a1       b0       c0 a1*b0*c0
## 6   6     Loc1  106   1       a0       b0       c1 a0*b0*c1
## 7   7     Loc1  107   1       a1       b1       c0 a1*b1*c0
## 8   8     Loc1  108   1       a0       b2       c1 a0*b2*c1
## 9   9     Loc1  109   1       a1       b1       c1 a1*b1*c1
## 10 10     Loc1  110   1       a0       b0       c0 a0*b0*c0
plt <- plot(fullFact2, l = 1)

p <- full_control_positions(plt$field_book[plt$field_book$LOCATION == "Loc1",], "COLUMN", "ROW", factor_name = "FACTOR_A", label = "FACTOR_A")
##    ID LOCATION PLOT ROW COLUMN REP FACTOR_A FACTOR_B FACTOR_C TRT_COMB
## 1   1     Loc1  101   1      1   1       a0       b1       c0 a0*b1*c0
## 2   2     Loc1  102   1      2   1       a1       b0       c1 a1*b0*c1
## 3   3     Loc1  103   1      3   1       a1       b2       c1 a1*b2*c1
## 4   4     Loc1  104   1      4   1       a0       b1       c1 a0*b1*c1
## 5   5     Loc1  108   2      1   1       a1       b0       c0 a1*b0*c0
## 6   6     Loc1  107   2      2   1       a0       b0       c1 a0*b0*c1
## 7   7     Loc1  106   2      3   1       a1       b1       c0 a1*b1*c0
## 8   8     Loc1  105   2      4   1       a0       b2       c1 a0*b2*c1
## 9   9     Loc1  109   3      1   1       a1       b1       c1 a1*b1*c1
## 10 10     Loc1  110   3      2   1       a0       b0       c0 a0*b0*c0
## 11 11     Loc1  111   3      3   1       a1       b2       c0 a1*b2*c0
## 12 12     Loc1  112   3      4   1       a0       b2       c0 a0*b2*c0
## 24 13     Loc1  204   4      1   2       a0       b2       c1 a0*b2*c1
## 23 14     Loc1  203   4      2   2       a0       b2       c0 a0*b2*c0
## 22 15     Loc1  202   4      3   2       a1       b0       c1 a1*b0*c1
## 21 16     Loc1  201   4      4   2       a0       b0       c1 a0*b0*c1
## 20 17     Loc1  205   5      1   2       a1       b2       c1 a1*b2*c1
## 19 18     Loc1  206   5      2   2       a1       b2       c0 a1*b2*c0
## 18 19     Loc1  207   5      3   2       a0       b0       c0 a0*b0*c0
## 17 20     Loc1  208   5      4   2       a0       b1       c0 a0*b1*c0
## 16 21     Loc1  212   6      1   2       a1       b0       c0 a1*b0*c0
## 15 22     Loc1  211   6      2   2       a1       b1       c0 a1*b1*c0
## 14 23     Loc1  210   6      3   2       a0       b1       c1 a0*b1*c1
## 13 24     Loc1  209   6      4   2       a1       b1       c1 a1*b1*c1
## 25 25     Loc1  301   7      1   3       a1       b2       c1 a1*b2*c1
## 26 26     Loc1  302   7      2   3       a0       b1       c1 a0*b1*c1
## 27 27     Loc1  303   7      3   3       a1       b0       c1 a1*b0*c1
## 28 28     Loc1  304   7      4   3       a0       b2       c0 a0*b2*c0
## 29 29     Loc1  308   8      1   3       a1       b1       c1 a1*b1*c1
## 30 30     Loc1  307   8      2   3       a0       b2       c1 a0*b2*c1
## 31 31     Loc1  306   8      3   3       a0       b0       c1 a0*b0*c1
## 32 32     Loc1  305   8      4   3       a0       b0       c0 a0*b0*c0
## 33 33     Loc1  309   9      1   3       a0       b1       c0 a0*b1*c0
## 34 34     Loc1  310   9      2   3       a1       b0       c0 a1*b0*c0
## 35 35     Loc1  311   9      3   3       a1       b2       c0 a1*b2*c0
## 36 36     Loc1  312   9      4   3       a1       b1       c0 a1*b1*c0
## 48 37     Loc1  404  10      1   4       a0       b1       c0 a0*b1*c0
## 47 38     Loc1  403  10      2   4       a0       b0       c1 a0*b0*c1
## 46 39     Loc1  402  10      3   4       a0       b0       c0 a0*b0*c0
## 45 40     Loc1  401  10      4   4       a1       b1       c0 a1*b1*c0
## 44 41     Loc1  405  11      1   4       a0       b2       c0 a0*b2*c0
## 43 42     Loc1  406  11      2   4       a1       b2       c1 a1*b2*c1
## 42 43     Loc1  407  11      3   4       a1       b1       c1 a1*b1*c1
## 41 44     Loc1  408  11      4   4       a1       b2       c0 a1*b2*c0
## 40 45     Loc1  412  12      1   4       a0       b2       c1 a0*b2*c1
## 39 46     Loc1  411  12      2   4       a0       b1       c1 a0*b1*c1
## 38 47     Loc1  410  12      3   4       a1       b0       c1 a1*b0*c1
## 37 48     Loc1  409  12      4   4       a1       b0       c0 a1*b0*c0
## 49 49     Loc1  501  13      1   5       a0       b0       c0 a0*b0*c0
## 50 50     Loc1  502  13      2   5       a0       b2       c0 a0*b2*c0
## 51 51     Loc1  503  13      3   5       a1       b0       c0 a1*b0*c0
## 52 52     Loc1  504  13      4   5       a1       b2       c0 a1*b2*c0
## 53 53     Loc1  508  14      1   5       a1       b1       c1 a1*b1*c1
## 54 54     Loc1  507  14      2   5       a0       b0       c1 a0*b0*c1
## 55 55     Loc1  506  14      3   5       a0       b1       c0 a0*b1*c0
## 56 56     Loc1  505  14      4   5       a1       b1       c0 a1*b1*c0
## 57 57     Loc1  509  15      1   5       a0       b1       c1 a0*b1*c1
## 58 58     Loc1  510  15      2   5       a0       b2       c1 a0*b2*c1
## 59 59     Loc1  511  15      3   5       a1       b0       c1 a1*b0*c1
## 60 60     Loc1  512  15      4   5       a1       b2       c1 a1*b2*c1
p

# Example 4: Incomplete Blocks Design

example("incomplete_blocks")
## 
## incmp_> # Example 1: Generates a resolvable IBD of characteristics (t,k,r) = (12,4,2).
## incmp_> # 1-resolvable IBDs
## incmp_> ibd1 <- incomplete_blocks(t = 12,
## incmp_+                           k = 4,
## incmp_+                           r = 2,
## incmp_+                           seed = 1984)
## 
## incmp_> ibd1$infoDesign
## $Reps
## [1] 2
## 
## $iBlocks
## [1] 3
## 
## $NumberTreatments
## [1] 12
## 
## $NumberLocations
## [1] 1
## 
## $Locations
## [1] 1
## 
## $seed
## [1] 1984
## 
## $lambda
## [1] 0.5454545
## 
## $id_design
## [1] 8
## 
## 
## incmp_> head(ibd1$fieldBook)
##   ID LOCATION PLOT REP IBLOCK UNIT ENTRY TREATMENT
## 1  1        1  101   1      1    1     8       G-8
## 2  2        1  102   1      1    2     9       G-9
## 3  3        1  103   1      1    3    12      G-12
## 4  4        1  104   1      1    4     1       G-1
## 5  5        1  105   1      2    1     5       G-5
## 6  6        1  106   1      2    2    11      G-11
## 
## incmp_> # Example 2: Generates a balanced resolvable IBD of characteristics (t,k,r) = (15,3,7).
## incmp_> # In this case, we show how to use the option data.
## incmp_> treatments <- paste("TX-", 1:15, sep = "")
## 
## incmp_> ENTRY <- 1:15
## 
## incmp_> treatment_list <- data.frame(list(ENTRY = ENTRY, TREATMENT = treatments))
## 
## incmp_> head(treatment_list)
##   ENTRY TREATMENT
## 1     1      TX-1
## 2     2      TX-2
## 3     3      TX-3
## 4     4      TX-4
## 5     5      TX-5
## 6     6      TX-6
## 
## incmp_> ibd2 <- incomplete_blocks(t = 15,
## incmp_+                           k = 3,
## incmp_+                           r = 7,
## incmp_+                           seed = 1985,
## incmp_+                           data = treatment_list)
## 
## incmp_> ibd2$infoDesign
## $Reps
## [1] 7
## 
## $iBlocks
## [1] 5
## 
## $NumberTreatments
## [1] 15
## 
## $NumberLocations
## [1] 1
## 
## $Locations
## [1] 1
## 
## $seed
## [1] 1985
## 
## $lambda
## [1] 1
## 
## $id_design
## [1] 8
## 
## 
## incmp_> head(ibd2$fieldBook)
##   ID LOCATION PLOT REP IBLOCK UNIT ENTRY TREATMENT
## 1  1        1  101   1      1    1     8      TX-8
## 2  2        1  102   1      1    2    11     TX-11
## 3  3        1  103   1      1    3     2      TX-2
## 4  4        1  104   1      2    1     4      TX-4
## 5  5        1  105   1      2    2    14     TX-14
## 6  6        1  106   1      2    3    13     TX-13
plt <- plot(ibd2)

p <- full_control_positions(plt$field_book, "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT")
##      ID LOCATION PLOT ROW COLUMN REP IBLOCK UNIT ENTRY TREATMENT
## 1     1        1  101   1      1   1      1    1     8      TX-8
## 2     4        1  102   1      2   1      2    1     4      TX-4
## 3     7        1  103   1      3   1      3    1     3      TX-3
## 4    10        1  104   1      4   1      4    1    12     TX-12
## 5    13        1  105   1      5   1      5    1     1      TX-1
## 6     2        1  110   2      1   1      1    2    11     TX-11
## 7     5        1  109   2      2   1      2    2    14     TX-14
## 8     8        1  108   2      3   1      3    2     6      TX-6
## 9    11        1  107   2      4   1      4    2    10     TX-10
## 10   14        1  106   2      5   1      5    2     7      TX-7
## 11    3        1  111   3      1   1      1    3     2      TX-2
## 12    6        1  112   3      2   1      2    3    13     TX-13
## 13    9        1  113   3      3   1      3    3    15     TX-15
## 14   12        1  114   3      4   1      4    3     9      TX-9
## 15   15        1  115   3      5   1      5    3     5      TX-5
## 16   16        1  205   4      1   2      1    1     4      TX-4
## 17   19        1  204   4      2   2      2    1    15     TX-15
## 18   22        1  203   4      3   2      3    1     5      TX-5
## 19   25        1  202   4      4   2      4    1     9      TX-9
## 20   28        1  201   4      5   2      5    1    14     TX-14
## 21   17        1  206   5      1   2      1    2     7      TX-7
## 22   20        1  207   5      2   2      2    2     2      TX-2
## 23   23        1  208   5      3   2      3    2     8      TX-8
## 24   26        1  209   5      4   2      4    2     3      TX-3
## 25   29        1  210   5      5   2      5    2    10     TX-10
## 26   18        1  215   6      1   2      1    3    12     TX-12
## 27   21        1  214   6      2   2      2    3    13     TX-13
## 28   24        1  213   6      3   2      3    3     6      TX-6
## 29   27        1  212   6      4   2      4    3    11     TX-11
## 30   30        1  211   6      5   2      5    3     1      TX-1
## 31   31        1  301   7      1   3      1    1     6      TX-6
## 32   34        1  302   7      2   3      2    1    10     TX-10
## 33   37        1  303   7      3   3      3    1     8      TX-8
## 34   40        1  304   7      4   3      4    1     1      TX-1
## 35   43        1  305   7      5   3      5    1     4      TX-4
## 36   32        1  310   8      1   3      1    2     7      TX-7
## 37   35        1  309   8      2   3      2    2     3      TX-3
## 38   38        1  308   8      3   3      3    2    13     TX-13
## 39   41        1  307   8      4   3      4    2    11     TX-11
## 40   44        1  306   8      5   3      5    2    14     TX-14
## 41   33        1  311   9      1   3      1    3     9      TX-9
## 42   36        1  312   9      2   3      2    3     5      TX-5
## 43   39        1  313   9      3   3      3    3    12     TX-12
## 44   42        1  314   9      4   3      4    3    15     TX-15
## 45   45        1  315   9      5   3      5    3     2      TX-2
## 46   46        1  405  10      1   4      1    1     1      TX-1
## 47   49        1  404  10      2   4      2    1    15     TX-15
## 48   52        1  403  10      3   4      3    1    14     TX-14
## 49   55        1  402  10      4   4      4    1     5      TX-5
## 50   58        1  401  10      5   4      5    1    13     TX-13
## 51   47        1  406  11      1   4      1    2     4      TX-4
## 52   50        1  407  11      2   4      2    2     8      TX-8
## 53   53        1  408  11      3   4      3    2     3      TX-3
## 54   56        1  409  11      4   4      4    2     9      TX-9
## 55   59        1  410  11      5   4      5    2    11     TX-11
## 56   48        1  415  12      1   4      1    3     6      TX-6
## 57   51        1  414  12      2   4      2    3    10     TX-10
## 58   54        1  413  12      3   4      3    3    12     TX-12
## 59   57        1  412  12      4   4      4    3     2      TX-2
## 60   60        1  411  12      5   4      5    3     7      TX-7
## 61   61        1  501  13      1   5      1    1    10     TX-10
## 62   64        1  502  13      2   5      2    1     7      TX-7
## 63   67        1  503  13      3   5      3    1    13     TX-13
## 64   70        1  504  13      4   5      4    1    14     TX-14
## 65   73        1  505  13      5   5      5    1    15     TX-15
## 66   62        1  510  14      1   5      1    2    11     TX-11
## 67   65        1  509  14      2   5      2    2     2      TX-2
## 68   68        1  508  14      3   5      3    2     1      TX-1
## 69   71        1  507  14      4   5      4    2     8      TX-8
## 70   74        1  506  14      5   5      5    2     5      TX-5
## 71   63        1  511  15      1   5      1    3     4      TX-4
## 72   66        1  512  15      2   5      2    3     6      TX-6
## 73   69        1  513  15      3   5      3    3     3      TX-3
## 74   72        1  514  15      4   5      4    3     9      TX-9
## 75   75        1  515  15      5   5      5    3    12     TX-12
## 76   76        1  605  16      1   6      1    1    13     TX-13
## 77   79        1  604  16      2   6      2    1     3      TX-3
## 78   82        1  603  16      3   6      3    1     4      TX-4
## 79   85        1  602  16      4   6      4    1    11     TX-11
## 80   88        1  601  16      5   6      5    1    14     TX-14
## 81   77        1  606  17      1   6      1    2     1      TX-1
## 82   80        1  607  17      2   6      2    2    10     TX-10
## 83   83        1  608  17      3   6      3    2     5      TX-5
## 84   86        1  609  17      4   6      4    2     6      TX-6
## 85   89        1  610  17      5   6      5    2     7      TX-7
## 86   78        1  615  18      1   6      1    3     9      TX-9
## 87   81        1  614  18      2   6      2    3     2      TX-2
## 88   84        1  613  18      3   6      3    3     8      TX-8
## 89   87        1  612  18      4   6      4    3    12     TX-12
## 90   90        1  611  18      5   6      5    3    15     TX-15
## 91   91        1  701  19      1   7      1    1     3      TX-3
## 92   94        1  702  19      2   7      2    1     1      TX-1
## 93   97        1  703  19      3   7      3    1     9      TX-9
## 94  100        1  704  19      4   7      4    1     5      TX-5
## 95  103        1  705  19      5   7      5    1    10     TX-10
## 96   92        1  710  20      1   7      1    2     8      TX-8
## 97   95        1  709  20      2   7      2    2     2      TX-2
## 98   98        1  708  20      3   7      3    2    15     TX-15
## 99  101        1  707  20      4   7      4    2    11     TX-11
## 100 104        1  706  20      5   7      5    2    13     TX-13
## 101  93        1  711  21      1   7      1    3     7      TX-7
## 102  96        1  712  21      2   7      2    3    12     TX-12
## 103  99        1  713  21      3   7      3    3     4      TX-4
## 104 102        1  714  21      4   7      4    3    14     TX-14
## 105 105        1  715  21      5   7      5    3     6      TX-6
p

# Example 5: Diagonal Arrangement Design

example("diagonal_arrangement")
## 
## dgnl_r> # Example 1: Generates a spatial single diagonal arrangement design in one location
## dgnl_r> # with 270 treatments and 30 check plots for a field with dimensions 15 rows x 20 cols
## dgnl_r> # in a serpentine arrangement.
## dgnl_r> spatd <- diagonal_arrangement(
## dgnl_r+   nrows = 15, 
## dgnl_r+   ncols = 20, 
## dgnl_r+   lines = 270, 
## dgnl_r+   checks = 4, 
## dgnl_r+   plotNumber = 101, 
## dgnl_r+   kindExpt = "SUDC", 
## dgnl_r+   planter = "serpentine", 
## dgnl_r+   seed = 1987,
## dgnl_r+   exptName = "20WRY1", 
## dgnl_r+   locationNames = "MINOT"
## dgnl_r+ )
## 
## dgnl_r> spatd$infoDesign
## $rows
## [1] 15
## 
## $columns
## [1] 20
## 
## $treatments
## [1] 270
## 
## $checks
## [1] 4
## 
## $entry_checks
## $entry_checks[[1]]
## [1] 1 2 3 4
## 
## 
## $rep_checks
## $rep_checks[[1]]
## [1] 8 7 8 7
## 
## 
## $locations
## [1] 1
## 
## $planter
## [1] "serpentine"
## 
## $percent_checks
## [1] "10%"
## 
## $fillers
## [1] 0
## 
## $seed
## [1] 1987
## 
## $id_design
## [1] 15
## 
## 
## dgnl_r> spatd$layoutRandom
## [[1]]
##       Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12 Col13
## Row15  164    3  153   11  221  179  151  139   58    22   266     2   129
## Row14   89  182  185   38    1  253  156  241  160   252   214    86   130
## Row13   15  148   82  213   44  194  269    2  265   169    48   245   210
## Row12    1  124   52  177    5  261   47   40   17    87     3   104   147
## Row11  100  127  136    4   19   65  158   46   18   229   157   274    59
## Row10   94   50   27   31  220  166    3  172  170    12    16   176   137
## Row9   205  212  115  142  110  208  224  216  222     2   246    42   251
## Row8   175   92    1  197  243  234  236   99  211    67   140    39     3
## Row7    75   76    8  122  200    1  264   25  138   199   107   120   131
## Row6   132   93  254    7  247   60   45  171    3   117   103   116   190
## Row5   181    2   70   79   85  133  203  134  184   273    34     1   174
## Row4    71  204  159   29    2   83   26   64  119   145   240   223   225
## Row3   144  231   80  255   43  187  112    4  168    98    32    41    96
## Row2     4  196  238  235   97  183  111  143  186   237     2   232   263
## Row1    55  108  248    4  250  217  123  249  126    28    23   118    20
##       Col14 Col15 Col16 Col17 Col18 Col19 Col20
## Row15    33   109   154    88    30    53    95
## Row14   163     4   219    68   270   173    90
## Row13   244   125   149   226     1    54    56
## Row12   259   233   267   201   193     6    10
## Row11     2   114    21    77   272    72    24
## Row10   102   155    36     3     9   162   191
## Row9    218   106   228   258   167    84     1
## Row8    230   192    62   135   198    14    69
## Row7    161    81     3   165   189   268    57
## Row6    128   146   206   141   215     4   195
## Row5     61   202    51   242    73    63   207
## Row4    113     1    78   178   152    37   180
## Row3    101    74    66   239     4   105   256
## Row2     49   262    91   257   121   260   209
## Row1      3    13   150   188    35   227   271
## 
## 
## dgnl_r> spatd$plotsNumber
## [[1]]
##       Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12 Col13
## Row15  381  382  383  384  385  386  387  388  389   390   391   392   393
## Row14  380  379  378  377  376  375  374  373  372   371   370   369   368
## Row13  341  342  343  344  345  346  347  348  349   350   351   352   353
## Row12  340  339  338  337  336  335  334  333  332   331   330   329   328
## Row11  301  302  303  304  305  306  307  308  309   310   311   312   313
## Row10  300  299  298  297  296  295  294  293  292   291   290   289   288
## Row9   261  262  263  264  265  266  267  268  269   270   271   272   273
## Row8   260  259  258  257  256  255  254  253  252   251   250   249   248
## Row7   221  222  223  224  225  226  227  228  229   230   231   232   233
## Row6   220  219  218  217  216  215  214  213  212   211   210   209   208
## Row5   181  182  183  184  185  186  187  188  189   190   191   192   193
## Row4   180  179  178  177  176  175  174  173  172   171   170   169   168
## Row3   141  142  143  144  145  146  147  148  149   150   151   152   153
## Row2   140  139  138  137  136  135  134  133  132   131   130   129   128
## Row1   101  102  103  104  105  106  107  108  109   110   111   112   113
##       Col14 Col15 Col16 Col17 Col18 Col19 Col20
## Row15   394   395   396   397   398   399   400
## Row14   367   366   365   364   363   362   361
## Row13   354   355   356   357   358   359   360
## Row12   327   326   325   324   323   322   321
## Row11   314   315   316   317   318   319   320
## Row10   287   286   285   284   283   282   281
## Row9    274   275   276   277   278   279   280
## Row8    247   246   245   244   243   242   241
## Row7    234   235   236   237   238   239   240
## Row6    207   206   205   204   203   202   201
## Row5    194   195   196   197   198   199   200
## Row4    167   166   165   164   163   162   161
## Row3    154   155   156   157   158   159   160
## Row2    127   126   125   124   123   122   121
## Row1    114   115   116   117   118   119   120
## 
## 
## dgnl_r> head(spatd$fieldBook, 12)
##    ID   EXPT LOCATION YEAR PLOT ROW COLUMN CHECKS ENTRY TREATMENT
## 1   1 20WRY1    MINOT 2024  101   1      1      0    55    Gen-55
## 2   2 20WRY1    MINOT 2024  102   1      2      0   108   Gen-108
## 3   3 20WRY1    MINOT 2024  103   1      3      0   248   Gen-248
## 4   4 20WRY1    MINOT 2024  104   1      4      4     4   Check-4
## 5   5 20WRY1    MINOT 2024  105   1      5      0   250   Gen-250
## 6   6 20WRY1    MINOT 2024  106   1      6      0   217   Gen-217
## 7   7 20WRY1    MINOT 2024  107   1      7      0   123   Gen-123
## 8   8 20WRY1    MINOT 2024  108   1      8      0   249   Gen-249
## 9   9 20WRY1    MINOT 2024  109   1      9      0   126   Gen-126
## 10 10 20WRY1    MINOT 2024  110   1     10      0    28    Gen-28
## 11 11 20WRY1    MINOT 2024  111   1     11      0    23    Gen-23
## 12 12 20WRY1    MINOT 2024  112   1     12      0   118   Gen-118
## 
## dgnl_r> # Example 2: Generates a spatial decision block diagonal arrangement design in one location
## dgnl_r> # with 720 treatments allocated in 5 experiments or blocks for a field with dimensions
## dgnl_r> # 30 rows x 26 cols in a serpentine arrangement. In this case, we show how to set up the data 
## dgnl_r> # option with the entries list.
## dgnl_r> checks <- 5;expts <- 5
## 
## dgnl_r> list_checks <- paste("CH", 1:checks, sep = "")
## 
## dgnl_r> treatments <- paste("G", 6:725, sep = "")
## 
## dgnl_r> treatment_list <- data.frame(list(ENTRY = 1:725, NAME = c(list_checks, treatments)))
## 
## dgnl_r> head(treatment_list, 12) 
##    ENTRY NAME
## 1      1  CH1
## 2      2  CH2
## 3      3  CH3
## 4      4  CH4
## 5      5  CH5
## 6      6   G6
## 7      7   G7
## 8      8   G8
## 9      9   G9
## 10    10  G10
## 11    11  G11
## 12    12  G12
## 
## dgnl_r> tail(treatment_list, 12)
##     ENTRY NAME
## 714   714 G714
## 715   715 G715
## 716   716 G716
## 717   717 G717
## 718   718 G718
## 719   719 G719
## 720   720 G720
## 721   721 G721
## 722   722 G722
## 723   723 G723
## 724   724 G724
## 725   725 G725
## 
## dgnl_r> spatDB <- diagonal_arrangement(
## dgnl_r+   nrows = 30, 
## dgnl_r+   ncols = 26,
## dgnl_r+   checks = 5, 
## dgnl_r+   plotNumber = 1, 
## dgnl_r+   kindExpt = "DBUDC", 
## dgnl_r+   planter = "serpentine", 
## dgnl_r+   splitBy = "row", 
## dgnl_r+   blocks = c(150,155,95,200,120),
## dgnl_r+   data = treatment_list
## dgnl_r+ )
## 
## dgnl_r> spatDB$infoDesign
## $rows
## [1] 30
## 
## $columns
## [1] 26
## 
## $treatments
## [1] 150 155  95 200 120
## 
## $checks
## [1] 5
## 
## $entry_checks
## $entry_checks[[1]]
## [1] 1 2 3 4 5
## 
## 
## $rep_checks
## $rep_checks[[1]]
## [1] 10 13 13 11 13
## 
## 
## $locations
## [1] 1
## 
## $planter
## [1] "serpentine"
## 
## $percent_checks
## [1] "7.7%"
## 
## $fillers
## [1] 0
## 
## $seed
## [1] 24210
## 
## $id_design
## [1] 15
## 
## 
## dgnl_r> spatDB$layoutRandom
## [[1]]
##       Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12 Col13
## Row30  702    3  686  699  642  709  701  689  664   720   696   633   708
## Row29  722  649  616  627  716    4  673  639  711   641   680   688   710
## Row28  698  615  631  674  672  636  626  685  608     4   651   697   650
## Row27    5  679  629  677  606  621  692  662  694   725   663   669   666
## Row26  661  622  610  678    3  612  687  657  713   609   675   670   704
## Row25  566  576  522  514  491  575  433  598    4   432   473   567   454
## Row24  529  500  488  518  580  458  526  525  419   480   548   605     5
## Row23  508  410  602    3  471  588  470  498  492   474   437   472   558
## Row22  442  541  468  552  463  482  449    2  584   443   423   599   535
## Row21  446  475  589  467  537  422  542  416  572   435   411     3   487
## Row20  560  547    3  460  597  429  448  469  590   409   464   506   478
## Row19  600  530  550  504  520  521    1  461  536   556   486   509   519
## Row18  436  544  447  424  415  545  543  438  512   595     4   578   534
## Row17  334    5  340  361  396  345  365  342  384   373   390   392   316
## Row16  367  366  335  387  404    2  311  395  389   348   328   394   380
## Row15  397  320  356  351  314  327  339  403  383     5   377   319   374
## Row14    1  321  331  337  353  402  352  364  358   322   369   329   405
## Row13  209  256  242  296    5  201  272  237  310   279   158   243   274
## Row12  186  292  222  193  275  179  200  261    3   252   204   250   289
## Row11  221  168  176  301  297  184  224  271  244   263   161   188     2
## Row10  306  206  307    2  300  298  255  278  284   295   259   173   241
## Row9   302  190  251  170  187  178  293    2  157   230   260   240   159
## Row8   246  181  189  277  192  232  162  228  305   167   245     5   194
## Row7    58   41    1  124   57   55   11  199  171   254   291   182   304
## Row6    96  133   44   81   98  139    2   66   62     7    53    70    20
## Row5   140   85   65   31   39  106   73   33   76   112     4    34    54
## Row4   145    3   50  128   64  137   95   42  144   120    92   118   115
## Row3   107   67   61  149   80    5  101   47   27    77   151   127    74
## Row2   138  116  122   88  154  117   29  110   78     4    60    83   113
## Row1     2   94  102  114   26   79   91  131   25   109     8     6    49
##       Col14 Col15 Col16 Col17 Col18 Col19 Col20 Col21 Col22 Col23 Col24 Col25
## Row30   723     5   655   611   667   700   619   617   721   623   624   635
## Row29   658   714   706   643   684     1   647   638   648   705   625   719
## Row28   681   640   652   654   630   715   646   724   637     2   620   718
## Row27     1   690   607   682   668   613   659   644   628   653   693   634
## Row26   671   691   614   676     2   632   717   660   665   703   707   618
## Row25   462   455   408   596   406   479   451   591     3   494   503   513
## Row24   583   426   453   483   561   496   456   571   430   440   570   459
## Row23   527   553   466     5   418   524   445   420   450   477   563   452
## Row22   431   555   585   538   413   417   577     4   485   546   489   551
## Row21   516   407   594   439   523   604   414   481   532   539   510     1
## Row20   562   586     2   581   573   515   531   425   501   444   587   421
## Row19   517   499   507   465   484   495     5   528   559   434   574   579
## Row18   412   603   476   490   565   511   457   540   582   593     2   568
## Row17   349     3   336   368   341   569   564   557   493   428   554   502
## Row16   385   355   323   378   375     4   318   381   399   333   362   401
## Row15   376   354   391   398   350   338   332   346   330     2   382   313
## Row14     3   370   386   315   325   371   324   372   379   326   317   312
## Row13   203   247   285   281     5   215   400   347   363   393   357   388
## Row12   264   191   286   174   225   269   197   238     1   202   217   164
## Row11   282   268   223   235   165   180   163   231   183   308   198   299
## Row10   216   273   177     4   294   156   276   207   169   160   195   229
## Row9    210   196   233   267   249   227   290     4   205   266   211   258
## Row8    219   208   280   175   172   309   236   234   239   283   212     1
## Row7    270   287     5   166   185   213   218   226   220   288   248   265
## Row6    105    32    84    12   103    16     4    35    19    69    71    87
## Row5    153   130    30    63   152   150    46   141    68    38     3    10
## Row4    155     2   125   147    56   132     9   119    59    13   146   121
## Row3     45    52    21    72   129     1    14    18    43    90    36    75
## Row2     86   134    24    22    15   143    93    17    97     3    99   100
## Row1      5   136    37    48    40   111   135   104   123    28    82   148
##       Col26
## Row30   645
## Row29   695
## Row28   712
## Row27   683
## Row26   656
## Row25   497
## Row24     1
## Row23   533
## Row22   427
## Row21   505
## Row20   549
## Row19   592
## Row18   601
## Row17   441
## Row16   343
## Row15   359
## Row14   360
## Row13   344
## Row12   303
## Row11     3
## Row10   214
## Row9    253
## Row8    257
## Row7    262
## Row6    108
## Row5     89
## Row4     51
## Row3    142
## Row2    126
## Row1     23
## 
## 
## dgnl_r> spatDB$plotsNumber
## [[1]]
##       Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12 Col13
## Row30  780  779  778  777  776  775  774  773  772   771   770   769   768
## Row29  729  730  731  732  733  734  735  736  737   738   739   740   741
## Row28  728  727  726  725  724  723  722  721  720   719   718   717   716
## Row27  677  678  679  680  681  682  683  684  685   686   687   688   689
## Row26  676  675  674  673  672  671  670  669  668   667   666   665   664
## Row25  625  626  627  628  629  630  631  632  633   634   635   636   637
## Row24  624  623  622  621  620  619  618  617  616   615   614   613   612
## Row23  573  574  575  576  577  578  579  580  581   582   583   584   585
## Row22  572  571  570  569  568  567  566  565  564   563   562   561   560
## Row21  521  522  523  524  525  526  527  528  529   530   531   532   533
## Row20  520  519  518  517  516  515  514  513  512   511   510   509   508
## Row19  469  470  471  472  473  474  475  476  477   478   479   480   481
## Row18  468  467  466  465  464  463  462  461  460   459   458   457   456
## Row17  417  418  419  420  421  422  423  424  425   426   427   428   429
## Row16  416  415  414  413  412  411  410  409  408   407   406   405   404
## Row15  365  366  367  368  369  370  371  372  373   374   375   376   377
## Row14  364  363  362  361  360  359  358  357  356   355   354   353   352
## Row13  313  314  315  316  317  318  319  320  321   322   323   324   325
## Row12  312  311  310  309  308  307  306  305  304   303   302   301   300
## Row11  261  262  263  264  265  266  267  268  269   270   271   272   273
## Row10  260  259  258  257  256  255  254  253  252   251   250   249   248
## Row9   209  210  211  212  213  214  215  216  217   218   219   220   221
## Row8   208  207  206  205  204  203  202  201  200   199   198   197   196
## Row7   157  158  159  160  161  162  163  164  165   166   167   168   169
## Row6   156  155  154  153  152  151  150  149  148   147   146   145   144
## Row5   105  106  107  108  109  110  111  112  113   114   115   116   117
## Row4   104  103  102  101  100   99   98   97   96    95    94    93    92
## Row3    53   54   55   56   57   58   59   60   61    62    63    64    65
## Row2    52   51   50   49   48   47   46   45   44    43    42    41    40
## Row1     1    2    3    4    5    6    7    8    9    10    11    12    13
##       Col14 Col15 Col16 Col17 Col18 Col19 Col20 Col21 Col22 Col23 Col24 Col25
## Row30   767   766   765   764   763   762   761   760   759   758   757   756
## Row29   742   743   744   745   746   747   748   749   750   751   752   753
## Row28   715   714   713   712   711   710   709   708   707   706   705   704
## Row27   690   691   692   693   694   695   696   697   698   699   700   701
## Row26   663   662   661   660   659   658   657   656   655   654   653   652
## Row25   638   639   640   641   642   643   644   645   646   647   648   649
## Row24   611   610   609   608   607   606   605   604   603   602   601   600
## Row23   586   587   588   589   590   591   592   593   594   595   596   597
## Row22   559   558   557   556   555   554   553   552   551   550   549   548
## Row21   534   535   536   537   538   539   540   541   542   543   544   545
## Row20   507   506   505   504   503   502   501   500   499   498   497   496
## Row19   482   483   484   485   486   487   488   489   490   491   492   493
## Row18   455   454   453   452   451   450   449   448   447   446   445   444
## Row17   430   431   432   433   434   435   436   437   438   439   440   441
## Row16   403   402   401   400   399   398   397   396   395   394   393   392
## Row15   378   379   380   381   382   383   384   385   386   387   388   389
## Row14   351   350   349   348   347   346   345   344   343   342   341   340
## Row13   326   327   328   329   330   331   332   333   334   335   336   337
## Row12   299   298   297   296   295   294   293   292   291   290   289   288
## Row11   274   275   276   277   278   279   280   281   282   283   284   285
## Row10   247   246   245   244   243   242   241   240   239   238   237   236
## Row9    222   223   224   225   226   227   228   229   230   231   232   233
## Row8    195   194   193   192   191   190   189   188   187   186   185   184
## Row7    170   171   172   173   174   175   176   177   178   179   180   181
## Row6    143   142   141   140   139   138   137   136   135   134   133   132
## Row5    118   119   120   121   122   123   124   125   126   127   128   129
## Row4     91    90    89    88    87    86    85    84    83    82    81    80
## Row3     66    67    68    69    70    71    72    73    74    75    76    77
## Row2     39    38    37    36    35    34    33    32    31    30    29    28
## Row1     14    15    16    17    18    19    20    21    22    23    24    25
##       Col26
## Row30   755
## Row29   754
## Row28   703
## Row27   702
## Row26   651
## Row25   650
## Row24   599
## Row23   598
## Row22   547
## Row21   546
## Row20   495
## Row19   494
## Row18   443
## Row17   442
## Row16   391
## Row15   390
## Row14   339
## Row13   338
## Row12   287
## Row11   286
## Row10   235
## Row9    234
## Row8    183
## Row7    182
## Row6    131
## Row5    130
## Row4     79
## Row3     78
## Row2     27
## Row1     26
## 
## 
## dgnl_r> head(spatDB$fieldBook,12)
##    ID   EXPT LOCATION YEAR PLOT ROW COLUMN CHECKS ENTRY TREATMENT
## 1   1 Block1        1 2024    1   1      1      2     2       CH2
## 2   2 Block1        1 2024    2   1      2      0    94       G94
## 3   3 Block1        1 2024    3   1      3      0   102      G102
## 4   4 Block1        1 2024    4   1      4      0   114      G114
## 5   5 Block1        1 2024    5   1      5      0    26       G26
## 6   6 Block1        1 2024    6   1      6      0    79       G79
## 7   7 Block1        1 2024    7   1      7      0    91       G91
## 8   8 Block1        1 2024    8   1      8      0   131      G131
## 9   9 Block1        1 2024    9   1      9      0    25       G25
## 10 10 Block1        1 2024   10   1     10      0   109      G109
## 11 11 Block1        1 2024   11   1     11      0     8        G8
## 12 12 Block1        1 2024   12   1     12      0     6        G6
## 
## dgnl_r> # Example 3: Generates a spatial decision block diagonal arrangement design in one location
## dgnl_r> # with 270 treatments allocated in 3 experiments or blocks for a field with dimensions
## dgnl_r> # 20 rows x 15 cols in a serpentine arrangement. Which in turn is an augmented block (3 blocks).
## dgnl_r> spatAB <- diagonal_arrangement(
## dgnl_r+   nrows = 20, 
## dgnl_r+   ncols = 15, 
## dgnl_r+   lines = 270, 
## dgnl_r+   checks = 4, 
## dgnl_r+   plotNumber = c(1,1001,2001), 
## dgnl_r+   kindExpt = "DBUDC", 
## dgnl_r+   planter = "serpentine",
## dgnl_r+   exptName = c("20WRA", "20WRB", "20WRC"), 
## dgnl_r+   blocks = c(90, 90, 90),
## dgnl_r+   splitBy = "column"
## dgnl_r+ )
## 
## dgnl_r> spatAB$infoDesign
## $rows
## [1] 20
## 
## $columns
## [1] 15
## 
## $treatments
## [1] 90 90 90
## 
## $checks
## [1] 4
## 
## $entry_checks
## $entry_checks[[1]]
## [1] 1 2 3 4
## 
## 
## $rep_checks
## $rep_checks[[1]]
## [1] 7 6 8 9
## 
## 
## $locations
## [1] 1
## 
## $planter
## [1] "serpentine"
## 
## $percent_checks
## [1] "10%"
## 
## $fillers
## [1] 0
## 
## $seed
## [1] 72391
## 
## $id_design
## [1] 15
## 
## 
## dgnl_r> spatAB$layoutRandom
## [[1]]
##       Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12 Col13
## Row20   82    1   56   57   70  144  172  148  146   173   219     4   229
## Row19   49   42   69   21    3  103  111  151  102   157   237   249   221
## Row18   44   10    9   29   12  109  177    3  106   149   262   225   226
## Row17    2   43   90   16   71  162  176  136  104   138     4   191   185
## Row16   75   88   36    1   30  110  133  175  180   158   193   253   186
## Row15   85   45   91   19   13   97    2  171  154   105   252   204   245
## Row14   86   67   14   83   93  134  161  100  140     4   211   217   251
## Row13   33   92    3    6    5  116  160  101  117    98   227   263     2
## Row12   54   31   74   89    8    3  181  145   99   114   254   223   267
## Row11   23    7   50   25   76  137  163  168    2   159   242   260   206
## Row10   63    4   11   24   61  139  182  167  153   130   208     3   216
## Row9    80   65   58   52    1  118  135  125  122   147   192   264   234
## Row8    32   26   41   48   39  152  183    4  165    95   233   220   240
## Row7     4   66   37   68   46  178  142  132   96   115     1   198   258
## Row6    55   27   35    2   77  155  166  131  127   169   209   212   256
## Row5    94   18   60   34   40  141    3  119  126   184   231   224   241
## Row4    59   15   73   38   84  179  113  170  164     1   232   189   235
## Row3    28   47    4   53   51  143  123  120  129   108   244   207     4
## Row2    64   20   17   72   81    4  107  150  174   156   210   230   222
## Row1    79   62   78   22   87  121  124  112    1   128   228   261   213
##       Col14 Col15
## Row20   243   259
## Row19   248     3
## Row18   246   196
## Row17   269   265
## Row16     2   190
## Row15   214   257
## Row14   188   266
## Row13   272   255
## Row12   201   203
## Row11   202   270
## Row10   205   215
## Row9    268     3
## Row8    218   197
## Row7    247   250
## Row6      1   187
## Row5    273   239
## Row4    236   274
## Row3    271   195
## Row2    200   199
## Row1    238   194
## 
## 
## dgnl_r> spatAB$plotsNumber
## [[1]]
##       Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12 Col13
## Row20  100   99   98   97   96 1100 1099 1098 1097  1096  2100  2099  2098
## Row19   91   92   93   94   95 1091 1092 1093 1094  1095  2091  2092  2093
## Row18   90   89   88   87   86 1090 1089 1088 1087  1086  2090  2089  2088
## Row17   81   82   83   84   85 1081 1082 1083 1084  1085  2081  2082  2083
## Row16   80   79   78   77   76 1080 1079 1078 1077  1076  2080  2079  2078
## Row15   71   72   73   74   75 1071 1072 1073 1074  1075  2071  2072  2073
## Row14   70   69   68   67   66 1070 1069 1068 1067  1066  2070  2069  2068
## Row13   61   62   63   64   65 1061 1062 1063 1064  1065  2061  2062  2063
## Row12   60   59   58   57   56 1060 1059 1058 1057  1056  2060  2059  2058
## Row11   51   52   53   54   55 1051 1052 1053 1054  1055  2051  2052  2053
## Row10   50   49   48   47   46 1050 1049 1048 1047  1046  2050  2049  2048
## Row9    41   42   43   44   45 1041 1042 1043 1044  1045  2041  2042  2043
## Row8    40   39   38   37   36 1040 1039 1038 1037  1036  2040  2039  2038
## Row7    31   32   33   34   35 1031 1032 1033 1034  1035  2031  2032  2033
## Row6    30   29   28   27   26 1030 1029 1028 1027  1026  2030  2029  2028
## Row5    21   22   23   24   25 1021 1022 1023 1024  1025  2021  2022  2023
## Row4    20   19   18   17   16 1020 1019 1018 1017  1016  2020  2019  2018
## Row3    11   12   13   14   15 1011 1012 1013 1014  1015  2011  2012  2013
## Row2    10    9    8    7    6 1010 1009 1008 1007  1006  2010  2009  2008
## Row1     1    2    3    4    5 1001 1002 1003 1004  1005  2001  2002  2003
##       Col14 Col15
## Row20  2097  2096
## Row19  2094  2095
## Row18  2087  2086
## Row17  2084  2085
## Row16  2077  2076
## Row15  2074  2075
## Row14  2067  2066
## Row13  2064  2065
## Row12  2057  2056
## Row11  2054  2055
## Row10  2047  2046
## Row9   2044  2045
## Row8   2037  2036
## Row7   2034  2035
## Row6   2027  2026
## Row5   2024  2025
## Row4   2017  2016
## Row3   2014  2015
## Row2   2007  2006
## Row1   2004  2005
## 
## 
## dgnl_r> head(spatAB$fieldBook,12)
##    ID  EXPT LOCATION YEAR PLOT ROW COLUMN CHECKS ENTRY TREATMENT
## 1   1 20WRA        1 2024    1   1      1      0    79    Gen-79
## 2   2 20WRA        1 2024    2   1      2      0    62    Gen-62
## 3   3 20WRA        1 2024    3   1      3      0    78    Gen-78
## 4   4 20WRA        1 2024    4   1      4      0    22    Gen-22
## 5   5 20WRA        1 2024    5   1      5      0    87    Gen-87
## 6   6 20WRB        1 2024 1001   1      6      0   121   Gen-121
## 7   7 20WRB        1 2024 1002   1      7      0   124   Gen-124
## 8   8 20WRB        1 2024 1003   1      8      0   112   Gen-112
## 9   9 20WRB        1 2024 1004   1      9      1     1   Check-1
## 10 10 20WRB        1 2024 1005   1     10      0   128   Gen-128
## 11 11 20WRC        1 2024 2001   1     11      0   228   Gen-228
## 12 12 20WRC        1 2024 2002   1     12      0   261   Gen-261
plt <- plot(spatAB)

p <- full_control_positions(plt$field_book, "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT")
##      ID  EXPT LOCATION YEAR PLOT ROW COLUMN CHECKS ENTRY TREATMENT
## 1     1 20WRA        1 2024    1   1      1      0    79    Gen-79
## 2     2 20WRA        1 2024    2   1      2      0    62    Gen-62
## 3     3 20WRA        1 2024    3   1      3      0    78    Gen-78
## 4     4 20WRA        1 2024    4   1      4      0    22    Gen-22
## 5     5 20WRA        1 2024    5   1      5      0    87    Gen-87
## 6     6 20WRB        1 2024 1001   1      6      0   121   Gen-121
## 7     7 20WRB        1 2024 1002   1      7      0   124   Gen-124
## 8     8 20WRB        1 2024 1003   1      8      0   112   Gen-112
## 9     9 20WRB        1 2024 1004   1      9      1     1   Check-1
## 10   10 20WRB        1 2024 1005   1     10      0   128   Gen-128
## 11   11 20WRC        1 2024 2001   1     11      0   228   Gen-228
## 12   12 20WRC        1 2024 2002   1     12      0   261   Gen-261
## 13   13 20WRC        1 2024 2003   1     13      0   213   Gen-213
## 14   14 20WRC        1 2024 2004   1     14      0   238   Gen-238
## 15   15 20WRC        1 2024 2005   1     15      0   194   Gen-194
## 16   16 20WRA        1 2024    6   2      5      0    81    Gen-81
## 17   17 20WRA        1 2024    7   2      4      0    72    Gen-72
## 18   18 20WRA        1 2024    8   2      3      0    17    Gen-17
## 19   19 20WRA        1 2024    9   2      2      0    20    Gen-20
## 20   20 20WRA        1 2024   10   2      1      0    64    Gen-64
## 21   21 20WRB        1 2024 1006   2     10      0   156   Gen-156
## 22   22 20WRB        1 2024 1007   2      9      0   174   Gen-174
## 23   23 20WRB        1 2024 1008   2      8      0   150   Gen-150
## 24   24 20WRB        1 2024 1009   2      7      0   107   Gen-107
## 25   25 20WRB        1 2024 1010   2      6      4     4   Check-4
## 26   26 20WRC        1 2024 2006   2     15      0   199   Gen-199
## 27   27 20WRC        1 2024 2007   2     14      0   200   Gen-200
## 28   28 20WRC        1 2024 2008   2     13      0   222   Gen-222
## 29   29 20WRC        1 2024 2009   2     12      0   230   Gen-230
## 30   30 20WRC        1 2024 2010   2     11      0   210   Gen-210
## 31   31 20WRA        1 2024   11   3      1      0    28    Gen-28
## 32   32 20WRA        1 2024   12   3      2      0    47    Gen-47
## 33   33 20WRA        1 2024   13   3      3      4     4   Check-4
## 34   34 20WRA        1 2024   14   3      4      0    53    Gen-53
## 35   35 20WRA        1 2024   15   3      5      0    51    Gen-51
## 36   36 20WRB        1 2024 1011   3      6      0   143   Gen-143
## 37   37 20WRB        1 2024 1012   3      7      0   123   Gen-123
## 38   38 20WRB        1 2024 1013   3      8      0   120   Gen-120
## 39   39 20WRB        1 2024 1014   3      9      0   129   Gen-129
## 40   40 20WRB        1 2024 1015   3     10      0   108   Gen-108
## 41   41 20WRC        1 2024 2011   3     11      0   244   Gen-244
## 42   42 20WRC        1 2024 2012   3     12      0   207   Gen-207
## 43   43 20WRC        1 2024 2013   3     13      4     4   Check-4
## 44   44 20WRC        1 2024 2014   3     14      0   271   Gen-271
## 45   45 20WRC        1 2024 2015   3     15      0   195   Gen-195
## 46   46 20WRA        1 2024   16   4      5      0    84    Gen-84
## 47   47 20WRA        1 2024   17   4      4      0    38    Gen-38
## 48   48 20WRA        1 2024   18   4      3      0    73    Gen-73
## 49   49 20WRA        1 2024   19   4      2      0    15    Gen-15
## 50   50 20WRA        1 2024   20   4      1      0    59    Gen-59
## 51   51 20WRB        1 2024 1016   4     10      1     1   Check-1
## 52   52 20WRB        1 2024 1017   4      9      0   164   Gen-164
## 53   53 20WRB        1 2024 1018   4      8      0   170   Gen-170
## 54   54 20WRB        1 2024 1019   4      7      0   113   Gen-113
## 55   55 20WRB        1 2024 1020   4      6      0   179   Gen-179
## 56   56 20WRC        1 2024 2016   4     15      0   274   Gen-274
## 57   57 20WRC        1 2024 2017   4     14      0   236   Gen-236
## 58   58 20WRC        1 2024 2018   4     13      0   235   Gen-235
## 59   59 20WRC        1 2024 2019   4     12      0   189   Gen-189
## 60   60 20WRC        1 2024 2020   4     11      0   232   Gen-232
## 61   61 20WRA        1 2024   21   5      1      0    94    Gen-94
## 62   62 20WRA        1 2024   22   5      2      0    18    Gen-18
## 63   63 20WRA        1 2024   23   5      3      0    60    Gen-60
## 64   64 20WRA        1 2024   24   5      4      0    34    Gen-34
## 65   65 20WRA        1 2024   25   5      5      0    40    Gen-40
## 66   66 20WRB        1 2024 1021   5      6      0   141   Gen-141
## 67   67 20WRB        1 2024 1022   5      7      3     3   Check-3
## 68   68 20WRB        1 2024 1023   5      8      0   119   Gen-119
## 69   69 20WRB        1 2024 1024   5      9      0   126   Gen-126
## 70   70 20WRB        1 2024 1025   5     10      0   184   Gen-184
## 71   71 20WRC        1 2024 2021   5     11      0   231   Gen-231
## 72   72 20WRC        1 2024 2022   5     12      0   224   Gen-224
## 73   73 20WRC        1 2024 2023   5     13      0   241   Gen-241
## 74   74 20WRC        1 2024 2024   5     14      0   273   Gen-273
## 75   75 20WRC        1 2024 2025   5     15      0   239   Gen-239
## 76   76 20WRA        1 2024   26   6      5      0    77    Gen-77
## 77   77 20WRA        1 2024   27   6      4      2     2   Check-2
## 78   78 20WRA        1 2024   28   6      3      0    35    Gen-35
## 79   79 20WRA        1 2024   29   6      2      0    27    Gen-27
## 80   80 20WRA        1 2024   30   6      1      0    55    Gen-55
## 81   81 20WRB        1 2024 1026   6     10      0   169   Gen-169
## 82   82 20WRB        1 2024 1027   6      9      0   127   Gen-127
## 83   83 20WRB        1 2024 1028   6      8      0   131   Gen-131
## 84   84 20WRB        1 2024 1029   6      7      0   166   Gen-166
## 85   85 20WRB        1 2024 1030   6      6      0   155   Gen-155
## 86   86 20WRC        1 2024 2026   6     15      0   187   Gen-187
## 87   87 20WRC        1 2024 2027   6     14      1     1   Check-1
## 88   88 20WRC        1 2024 2028   6     13      0   256   Gen-256
## 89   89 20WRC        1 2024 2029   6     12      0   212   Gen-212
## 90   90 20WRC        1 2024 2030   6     11      0   209   Gen-209
## 91   91 20WRA        1 2024   31   7      1      4     4   Check-4
## 92   92 20WRA        1 2024   32   7      2      0    66    Gen-66
## 93   93 20WRA        1 2024   33   7      3      0    37    Gen-37
## 94   94 20WRA        1 2024   34   7      4      0    68    Gen-68
## 95   95 20WRA        1 2024   35   7      5      0    46    Gen-46
## 96   96 20WRB        1 2024 1031   7      6      0   178   Gen-178
## 97   97 20WRB        1 2024 1032   7      7      0   142   Gen-142
## 98   98 20WRB        1 2024 1033   7      8      0   132   Gen-132
## 99   99 20WRB        1 2024 1034   7      9      0    96    Gen-96
## 100 100 20WRB        1 2024 1035   7     10      0   115   Gen-115
## 101 101 20WRC        1 2024 2031   7     11      1     1   Check-1
## 102 102 20WRC        1 2024 2032   7     12      0   198   Gen-198
## 103 103 20WRC        1 2024 2033   7     13      0   258   Gen-258
## 104 104 20WRC        1 2024 2034   7     14      0   247   Gen-247
## 105 105 20WRC        1 2024 2035   7     15      0   250   Gen-250
## 106 106 20WRA        1 2024   36   8      5      0    39    Gen-39
## 107 107 20WRA        1 2024   37   8      4      0    48    Gen-48
## 108 108 20WRA        1 2024   38   8      3      0    41    Gen-41
## 109 109 20WRA        1 2024   39   8      2      0    26    Gen-26
## 110 110 20WRA        1 2024   40   8      1      0    32    Gen-32
## 111 111 20WRB        1 2024 1036   8     10      0    95    Gen-95
## 112 112 20WRB        1 2024 1037   8      9      0   165   Gen-165
## 113 113 20WRB        1 2024 1038   8      8      4     4   Check-4
## 114 114 20WRB        1 2024 1039   8      7      0   183   Gen-183
## 115 115 20WRB        1 2024 1040   8      6      0   152   Gen-152
## 116 116 20WRC        1 2024 2036   8     15      0   197   Gen-197
## 117 117 20WRC        1 2024 2037   8     14      0   218   Gen-218
## 118 118 20WRC        1 2024 2038   8     13      0   240   Gen-240
## 119 119 20WRC        1 2024 2039   8     12      0   220   Gen-220
## 120 120 20WRC        1 2024 2040   8     11      0   233   Gen-233
## 121 121 20WRA        1 2024   41   9      1      0    80    Gen-80
## 122 122 20WRA        1 2024   42   9      2      0    65    Gen-65
## 123 123 20WRA        1 2024   43   9      3      0    58    Gen-58
## 124 124 20WRA        1 2024   44   9      4      0    52    Gen-52
## 125 125 20WRA        1 2024   45   9      5      1     1   Check-1
## 126 126 20WRB        1 2024 1041   9      6      0   118   Gen-118
## 127 127 20WRB        1 2024 1042   9      7      0   135   Gen-135
## 128 128 20WRB        1 2024 1043   9      8      0   125   Gen-125
## 129 129 20WRB        1 2024 1044   9      9      0   122   Gen-122
## 130 130 20WRB        1 2024 1045   9     10      0   147   Gen-147
## 131 131 20WRC        1 2024 2041   9     11      0   192   Gen-192
## 132 132 20WRC        1 2024 2042   9     12      0   264   Gen-264
## 133 133 20WRC        1 2024 2043   9     13      0   234   Gen-234
## 134 134 20WRC        1 2024 2044   9     14      0   268   Gen-268
## 135 135 20WRC        1 2024 2045   9     15      3     3   Check-3
## 136 136 20WRA        1 2024   46  10      5      0    61    Gen-61
## 137 137 20WRA        1 2024   47  10      4      0    24    Gen-24
## 138 138 20WRA        1 2024   48  10      3      0    11    Gen-11
## 139 139 20WRA        1 2024   49  10      2      4     4   Check-4
## 140 140 20WRA        1 2024   50  10      1      0    63    Gen-63
## 141 141 20WRB        1 2024 1046  10     10      0   130   Gen-130
## 142 142 20WRB        1 2024 1047  10      9      0   153   Gen-153
## 143 143 20WRB        1 2024 1048  10      8      0   167   Gen-167
## 144 144 20WRB        1 2024 1049  10      7      0   182   Gen-182
## 145 145 20WRB        1 2024 1050  10      6      0   139   Gen-139
## 146 146 20WRC        1 2024 2046  10     15      0   215   Gen-215
## 147 147 20WRC        1 2024 2047  10     14      0   205   Gen-205
## 148 148 20WRC        1 2024 2048  10     13      0   216   Gen-216
## 149 149 20WRC        1 2024 2049  10     12      3     3   Check-3
## 150 150 20WRC        1 2024 2050  10     11      0   208   Gen-208
## 151 151 20WRA        1 2024   51  11      1      0    23    Gen-23
## 152 152 20WRA        1 2024   52  11      2      0     7     Gen-7
## 153 153 20WRA        1 2024   53  11      3      0    50    Gen-50
## 154 154 20WRA        1 2024   54  11      4      0    25    Gen-25
## 155 155 20WRA        1 2024   55  11      5      0    76    Gen-76
## 156 156 20WRB        1 2024 1051  11      6      0   137   Gen-137
## 157 157 20WRB        1 2024 1052  11      7      0   163   Gen-163
## 158 158 20WRB        1 2024 1053  11      8      0   168   Gen-168
## 159 159 20WRB        1 2024 1054  11      9      2     2   Check-2
## 160 160 20WRB        1 2024 1055  11     10      0   159   Gen-159
## 161 161 20WRC        1 2024 2051  11     11      0   242   Gen-242
## 162 162 20WRC        1 2024 2052  11     12      0   260   Gen-260
## 163 163 20WRC        1 2024 2053  11     13      0   206   Gen-206
## 164 164 20WRC        1 2024 2054  11     14      0   202   Gen-202
## 165 165 20WRC        1 2024 2055  11     15      0   270   Gen-270
## 166 166 20WRA        1 2024   56  12      5      0     8     Gen-8
## 167 167 20WRA        1 2024   57  12      4      0    89    Gen-89
## 168 168 20WRA        1 2024   58  12      3      0    74    Gen-74
## 169 169 20WRA        1 2024   59  12      2      0    31    Gen-31
## 170 170 20WRA        1 2024   60  12      1      0    54    Gen-54
## 171 171 20WRB        1 2024 1056  12     10      0   114   Gen-114
## 172 172 20WRB        1 2024 1057  12      9      0    99    Gen-99
## 173 173 20WRB        1 2024 1058  12      8      0   145   Gen-145
## 174 174 20WRB        1 2024 1059  12      7      0   181   Gen-181
## 175 175 20WRB        1 2024 1060  12      6      3     3   Check-3
## 176 176 20WRC        1 2024 2056  12     15      0   203   Gen-203
## 177 177 20WRC        1 2024 2057  12     14      0   201   Gen-201
## 178 178 20WRC        1 2024 2058  12     13      0   267   Gen-267
## 179 179 20WRC        1 2024 2059  12     12      0   223   Gen-223
## 180 180 20WRC        1 2024 2060  12     11      0   254   Gen-254
## 181 181 20WRA        1 2024   61  13      1      0    33    Gen-33
## 182 182 20WRA        1 2024   62  13      2      0    92    Gen-92
## 183 183 20WRA        1 2024   63  13      3      3     3   Check-3
## 184 184 20WRA        1 2024   64  13      4      0     6     Gen-6
## 185 185 20WRA        1 2024   65  13      5      0     5     Gen-5
## 186 186 20WRB        1 2024 1061  13      6      0   116   Gen-116
## 187 187 20WRB        1 2024 1062  13      7      0   160   Gen-160
## 188 188 20WRB        1 2024 1063  13      8      0   101   Gen-101
## 189 189 20WRB        1 2024 1064  13      9      0   117   Gen-117
## 190 190 20WRB        1 2024 1065  13     10      0    98    Gen-98
## 191 191 20WRC        1 2024 2061  13     11      0   227   Gen-227
## 192 192 20WRC        1 2024 2062  13     12      0   263   Gen-263
## 193 193 20WRC        1 2024 2063  13     13      2     2   Check-2
## 194 194 20WRC        1 2024 2064  13     14      0   272   Gen-272
## 195 195 20WRC        1 2024 2065  13     15      0   255   Gen-255
## 196 196 20WRA        1 2024   66  14      5      0    93    Gen-93
## 197 197 20WRA        1 2024   67  14      4      0    83    Gen-83
## 198 198 20WRA        1 2024   68  14      3      0    14    Gen-14
## 199 199 20WRA        1 2024   69  14      2      0    67    Gen-67
## 200 200 20WRA        1 2024   70  14      1      0    86    Gen-86
## 201 201 20WRB        1 2024 1066  14     10      4     4   Check-4
## 202 202 20WRB        1 2024 1067  14      9      0   140   Gen-140
## 203 203 20WRB        1 2024 1068  14      8      0   100   Gen-100
## 204 204 20WRB        1 2024 1069  14      7      0   161   Gen-161
## 205 205 20WRB        1 2024 1070  14      6      0   134   Gen-134
## 206 206 20WRC        1 2024 2066  14     15      0   266   Gen-266
## 207 207 20WRC        1 2024 2067  14     14      0   188   Gen-188
## 208 208 20WRC        1 2024 2068  14     13      0   251   Gen-251
## 209 209 20WRC        1 2024 2069  14     12      0   217   Gen-217
## 210 210 20WRC        1 2024 2070  14     11      0   211   Gen-211
## 211 211 20WRA        1 2024   71  15      1      0    85    Gen-85
## 212 212 20WRA        1 2024   72  15      2      0    45    Gen-45
## 213 213 20WRA        1 2024   73  15      3      0    91    Gen-91
## 214 214 20WRA        1 2024   74  15      4      0    19    Gen-19
## 215 215 20WRA        1 2024   75  15      5      0    13    Gen-13
## 216 216 20WRB        1 2024 1071  15      6      0    97    Gen-97
## 217 217 20WRB        1 2024 1072  15      7      2     2   Check-2
## 218 218 20WRB        1 2024 1073  15      8      0   171   Gen-171
## 219 219 20WRB        1 2024 1074  15      9      0   154   Gen-154
## 220 220 20WRB        1 2024 1075  15     10      0   105   Gen-105
## 221 221 20WRC        1 2024 2071  15     11      0   252   Gen-252
## 222 222 20WRC        1 2024 2072  15     12      0   204   Gen-204
## 223 223 20WRC        1 2024 2073  15     13      0   245   Gen-245
## 224 224 20WRC        1 2024 2074  15     14      0   214   Gen-214
## 225 225 20WRC        1 2024 2075  15     15      0   257   Gen-257
## 226 226 20WRA        1 2024   76  16      5      0    30    Gen-30
## 227 227 20WRA        1 2024   77  16      4      1     1   Check-1
## 228 228 20WRA        1 2024   78  16      3      0    36    Gen-36
## 229 229 20WRA        1 2024   79  16      2      0    88    Gen-88
## 230 230 20WRA        1 2024   80  16      1      0    75    Gen-75
## 231 231 20WRB        1 2024 1076  16     10      0   158   Gen-158
## 232 232 20WRB        1 2024 1077  16      9      0   180   Gen-180
## 233 233 20WRB        1 2024 1078  16      8      0   175   Gen-175
## 234 234 20WRB        1 2024 1079  16      7      0   133   Gen-133
## 235 235 20WRB        1 2024 1080  16      6      0   110   Gen-110
## 236 236 20WRC        1 2024 2076  16     15      0   190   Gen-190
## 237 237 20WRC        1 2024 2077  16     14      2     2   Check-2
## 238 238 20WRC        1 2024 2078  16     13      0   186   Gen-186
## 239 239 20WRC        1 2024 2079  16     12      0   253   Gen-253
## 240 240 20WRC        1 2024 2080  16     11      0   193   Gen-193
## 241 241 20WRA        1 2024   81  17      1      2     2   Check-2
## 242 242 20WRA        1 2024   82  17      2      0    43    Gen-43
## 243 243 20WRA        1 2024   83  17      3      0    90    Gen-90
## 244 244 20WRA        1 2024   84  17      4      0    16    Gen-16
## 245 245 20WRA        1 2024   85  17      5      0    71    Gen-71
## 246 246 20WRB        1 2024 1081  17      6      0   162   Gen-162
## 247 247 20WRB        1 2024 1082  17      7      0   176   Gen-176
## 248 248 20WRB        1 2024 1083  17      8      0   136   Gen-136
## 249 249 20WRB        1 2024 1084  17      9      0   104   Gen-104
## 250 250 20WRB        1 2024 1085  17     10      0   138   Gen-138
## 251 251 20WRC        1 2024 2081  17     11      4     4   Check-4
## 252 252 20WRC        1 2024 2082  17     12      0   191   Gen-191
## 253 253 20WRC        1 2024 2083  17     13      0   185   Gen-185
## 254 254 20WRC        1 2024 2084  17     14      0   269   Gen-269
## 255 255 20WRC        1 2024 2085  17     15      0   265   Gen-265
## 256 256 20WRA        1 2024   86  18      5      0    12    Gen-12
## 257 257 20WRA        1 2024   87  18      4      0    29    Gen-29
## 258 258 20WRA        1 2024   88  18      3      0     9     Gen-9
## 259 259 20WRA        1 2024   89  18      2      0    10    Gen-10
## 260 260 20WRA        1 2024   90  18      1      0    44    Gen-44
## 261 261 20WRB        1 2024 1086  18     10      0   149   Gen-149
## 262 262 20WRB        1 2024 1087  18      9      0   106   Gen-106
## 263 263 20WRB        1 2024 1088  18      8      3     3   Check-3
## 264 264 20WRB        1 2024 1089  18      7      0   177   Gen-177
## 265 265 20WRB        1 2024 1090  18      6      0   109   Gen-109
## 266 266 20WRC        1 2024 2086  18     15      0   196   Gen-196
## 267 267 20WRC        1 2024 2087  18     14      0   246   Gen-246
## 268 268 20WRC        1 2024 2088  18     13      0   226   Gen-226
## 269 269 20WRC        1 2024 2089  18     12      0   225   Gen-225
## 270 270 20WRC        1 2024 2090  18     11      0   262   Gen-262
## 271 271 20WRA        1 2024   91  19      1      0    49    Gen-49
## 272 272 20WRA        1 2024   92  19      2      0    42    Gen-42
## 273 273 20WRA        1 2024   93  19      3      0    69    Gen-69
## 274 274 20WRA        1 2024   94  19      4      0    21    Gen-21
## 275 275 20WRA        1 2024   95  19      5      3     3   Check-3
## 276 276 20WRB        1 2024 1091  19      6      0   103   Gen-103
## 277 277 20WRB        1 2024 1092  19      7      0   111   Gen-111
## 278 278 20WRB        1 2024 1093  19      8      0   151   Gen-151
## 279 279 20WRB        1 2024 1094  19      9      0   102   Gen-102
## 280 280 20WRB        1 2024 1095  19     10      0   157   Gen-157
## 281 281 20WRC        1 2024 2091  19     11      0   237   Gen-237
## 282 282 20WRC        1 2024 2092  19     12      0   249   Gen-249
## 283 283 20WRC        1 2024 2093  19     13      0   221   Gen-221
## 284 284 20WRC        1 2024 2094  19     14      0   248   Gen-248
## 285 285 20WRC        1 2024 2095  19     15      3     3   Check-3
## 286 286 20WRA        1 2024   96  20      5      0    70    Gen-70
## 287 287 20WRA        1 2024   97  20      4      0    57    Gen-57
## 288 288 20WRA        1 2024   98  20      3      0    56    Gen-56
## 289 289 20WRA        1 2024   99  20      2      1     1   Check-1
## 290 290 20WRA        1 2024  100  20      1      0    82    Gen-82
## 291 291 20WRB        1 2024 1096  20     10      0   173   Gen-173
## 292 292 20WRB        1 2024 1097  20      9      0   146   Gen-146
## 293 293 20WRB        1 2024 1098  20      8      0   148   Gen-148
## 294 294 20WRB        1 2024 1099  20      7      0   172   Gen-172
## 295 295 20WRB        1 2024 1100  20      6      0   144   Gen-144
## 296 296 20WRC        1 2024 2096  20     15      0   259   Gen-259
## 297 297 20WRC        1 2024 2097  20     14      0   243   Gen-243
## 298 298 20WRC        1 2024 2098  20     13      0   229   Gen-229
## 299 299 20WRC        1 2024 2099  20     12      4     4   Check-4
## 300 300 20WRC        1 2024 2100  20     11      0   219   Gen-219
p

# Example 6: Augmented Randomized Complete Block Design (ARCBD)

example("RCBD_augmented")
## 
## RCBD_g> # Example 1: Generates an ARCBD with 6 blocks, 3 checks for each, and 50 treatments 
## RCBD_g> # in two locations.
## RCBD_g> ARCBD1 <- RCBD_augmented(lines = 50, checks = 3, b = 6, l = 2, 
## RCBD_g+                          planter = "cartesian", 
## RCBD_g+                          plotNumber = c(1,1001),
## RCBD_g+                          seed = 23, 
## RCBD_g+                          locationNames = c("FARGO", "MINOT"))
## 
## RCBD_g> ARCBD1$infoDesign
## $rows
## [1] 6
## 
## $columns
## [1] 12
## 
## $rows_within_blocks
## [1] 1
## 
## $columns_within_blocks
## [1] 12
## 
## $treatments
## [1] 50
## 
## $checks
## [1] 3
## 
## $blocks
## [1] 6
## 
## $plots_per_block
## [1] 12 12 12 12 12  8
## 
## $locations
## [1] 2
## 
## $fillers
## [1] 4
## 
## $seed
## [1] 23
## 
## $id_design
## [1] 14
## 
## 
## RCBD_g> ARCBD1$layoutRandom
##      Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12
## Row6    2   15   38    3   21   36   26    1    0     0     0     0
## Row5    3    1   24   46   11    2   48   37   32    31    20    42
## Row4   34   25   16   41    9   50    2   43   39     1    13     3
## Row3   18   28    5    2   40    8   30   17   53    10     3     1
## Row2    7   29   12    2    3   33   22   23    4    47    19     1
## Row1   49   14   27    3    2   45    6   35   52    44    51     1
## 
## RCBD_g> ARCBD1$exptNames
##      V1    V2    V3    V4    V5    V6    V7    V8    V9   V10   V11   V12
## 1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 2 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 3 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 4 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 5 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 6 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 
## RCBD_g> ARCBD1$plotNumber
##      V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12
## [1,] 61 62 63 64 65 66 67 68  0   0   0   0
## [2,] 49 50 51 52 53 54 55 56 57  58  59  60
## [3,] 37 38 39 40 41 42 43 44 45  46  47  48
## [4,] 25 26 27 28 29 30 31 32 33  34  35  36
## [5,] 13 14 15 16 17 18 19 20 21  22  23  24
## [6,]  1  2  3  4  5  6  7  8  9  10  11  12
## 
## RCBD_g> head(ARCBD1$fieldBook, 12)
##    ID  EXPT LOCATION YEAR PLOT ROW COLUMN CHECKS BLOCK ENTRY TREATMENT
## 1   1 Expt1    FARGO 2024    1   1      1      0     1    49       G49
## 2   2 Expt1    FARGO 2024    2   1      2      0     1    14       G14
## 3   3 Expt1    FARGO 2024    3   1      3      0     1    27       G27
## 4   4 Expt1    FARGO 2024    4   1      4      1     1     3       CH3
## 5   5 Expt1    FARGO 2024    5   1      5      1     1     2       CH2
## 6   6 Expt1    FARGO 2024    6   1      6      0     1    45       G45
## 7   7 Expt1    FARGO 2024    7   1      7      0     1     6        G6
## 8   8 Expt1    FARGO 2024    8   1      8      0     1    35       G35
## 9   9 Expt1    FARGO 2024    9   1      9      0     1    52       G52
## 10 10 Expt1    FARGO 2024   10   1     10      0     1    44       G44
## 11 11 Expt1    FARGO 2024   11   1     11      0     1    51       G51
## 12 12 Expt1    FARGO 2024   12   1     12      1     1     1       CH1
## 
## RCBD_g> # Example 2: Generates an ARCBD with 17 blocks, 4 checks for each, and 350 treatments 
## RCBD_g> # in 3 locations.
## RCBD_g> # In this case, we show how to use the option data.
## RCBD_g> checks <- 4;
## 
## RCBD_g> list_checks <- paste("CH", 1:checks, sep = "")
## 
## RCBD_g> treatments <- paste("G", 5:354, sep = "")
## 
## RCBD_g> treatment_list <- data.frame(list(ENTRY = 1:354, NAME = c(list_checks, treatments)))
## 
## RCBD_g> head(treatment_list, 12)
##    ENTRY NAME
## 1      1  CH1
## 2      2  CH2
## 3      3  CH3
## 4      4  CH4
## 5      5   G5
## 6      6   G6
## 7      7   G7
## 8      8   G8
## 9      9   G9
## 10    10  G10
## 11    11  G11
## 12    12  G12
## 
## RCBD_g> ARCBD2 <- RCBD_augmented(lines = 350, checks = 4, b = 17, l = 3, 
## RCBD_g+                          planter = "serpentine", 
## RCBD_g+                          plotNumber = c(101,1001,2001), 
## RCBD_g+                          seed = 24, 
## RCBD_g+                          locationNames = LETTERS[1:3],
## RCBD_g+                          data = treatment_list)
## 
## RCBD_g> ARCBD2$infoDesign
## $rows
## [1] 17
## 
## $columns
## [1] 25
## 
## $rows_within_blocks
## [1] 1
## 
## $columns_within_blocks
## [1] 25
## 
## $treatments
## [1] 350
## 
## $checks
## [1] 4
## 
## $blocks
## [1] 17
## 
## $plots_per_block
##  [1] 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 18
## 
## $locations
## [1] 3
## 
## $fillers
## [1] 7
## 
## $seed
## [1] 24
## 
## $id_design
## [1] 14
## 
## 
## RCBD_g> ARCBD2$layoutRandom
##       Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12 Col13
## Row17  257  259    1  198  331   66    3  238  170   176   126   207   225
## Row16   17   12    1  314   22  235   77  340  188    76   101     2    16
## Row15  229  231   54    3  305    4  128   50   30    55     1   337    24
## Row14   63   45   62   40  140  322   82  228  283   142    53   211     7
## Row13  253    2   68  113   13  279   47   57    4   132     3   167   159
## Row12  282  205  192  324  315    2  247  124  179    58   105   273    31
## Row11  110  125   85  332  250  248  265  255    2   251    52    42   236
## Row10  173  154  338  327   78    3   96  177  193     4   244   191   348
## Row9     4    2   25  103   36  155  260  246  189    49   197   284   242
## Row8   107  321  186    4  163   33   71  109  100   174   309    18   135
## Row7     2  239  252  213  261  150    3  266  277   307     4    95   311
## Row6   133   75  153  102  274    2    4    1  270   285     3   240   276
## Row5   234   56  349  288  202  300   79   87  157    64   168     1     4
## Row4   160  195    2  289  161   83  143  271  141   144    94   320     3
## Row3   268  209    4  185  308  115   81  342  249   258   120     1     2
## Row2   172  347  346  215  298   86    1  116  328   224   139     3     4
## Row1   345  130    4  162    1  123    2   39    9   302   210   352   138
##       Col14 Col15 Col16 Col17 Col18 Col19 Col20 Col21 Col22 Col23 Col24 Col25
## Row17   122     4   208   187     2     0     0     0     0     0     0     0
## Row16     3   219   111   291   316     4   341   169   222   237    65   281
## Row15   329   263     2    74   108   318   350   147   306   325    37    43
## Row14   136   310     5     2   199     1     4   164    46     3   158   223
## Row13    23     1   148   117   201    28    11   119   190    73    72    99
## Row12    32     1    27   243   241    21     3   303     4   106   127   254
## Row11    35     1   216    61     3     4   230    69   245   339    98    14
## Row10     1   227   323     2   203   118   181    88   104    10   272   175
## Row9    335   217   319   200     3   152    97   267    44   275    92     1
## Row8    221   333   121     2     1     3   214   226   183    15   194   351
## Row7    313    60   293    38    59    67   232   134     1   178    93   114
## Row6    156    41   165   146    51   317   292   280   343   171   334    84
## Row5    220    34   131   262     3   180   129   145     2   212    91   278
## Row4     19   353   301     6     4   206   304     1   233   354   166    20
## Row3    294    89   269    29    26   286   290   336    80     3   149   312
## Row2     48   295   151   287     2   326    70   264   204   137   296     8
## Row1    297   330     3   256    90   184   196   218   344   299   182   112
## 
## RCBD_g> ARCBD2$exptNames
##       V1    V2    V3    V4    V5    V6    V7    V8    V9   V10   V11   V12
## 1  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 2  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 3  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 4  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 5  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 6  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 7  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 8  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 9  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 10 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 11 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 12 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 13 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 14 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 15 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 16 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 17 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
##      V13   V14   V15   V16   V17   V18   V19   V20   V21   V22   V23   V24
## 1  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 2  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 3  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 4  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 5  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 6  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 7  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 8  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 9  Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 10 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 11 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 12 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 13 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 14 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 15 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 16 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
## 17 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1 Expt1
##      V25
## 1  Expt1
## 2  Expt1
## 3  Expt1
## 4  Expt1
## 5  Expt1
## 6  Expt1
## 7  Expt1
## 8  Expt1
## 9  Expt1
## 10 Expt1
## 11 Expt1
## 12 Expt1
## 13 Expt1
## 14 Expt1
## 15 Expt1
## 16 Expt1
## 17 Expt1
## 
## RCBD_g> ARCBD2$plotNumber
##        V1  V2  V3  V4  V5  V6  V7  V8  V9 V10 V11 V12 V13 V14 V15 V16 V17 V18
##  [1,] 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518
##  [2,] 500 499 498 497 496 495 494 493 492 491 490 489 488 487 486 485 484 483
##  [3,] 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468
##  [4,] 450 449 448 447 446 445 444 443 442 441 440 439 438 437 436 435 434 433
##  [5,] 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418
##  [6,] 400 399 398 397 396 395 394 393 392 391 390 389 388 387 386 385 384 383
##  [7,] 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368
##  [8,] 350 349 348 347 346 345 344 343 342 341 340 339 338 337 336 335 334 333
##  [9,] 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
## [10,] 300 299 298 297 296 295 294 293 292 291 290 289 288 287 286 285 284 283
## [11,] 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268
## [12,] 250 249 248 247 246 245 244 243 242 241 240 239 238 237 236 235 234 233
## [13,] 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
## [14,] 200 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183
## [15,] 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
## [16,] 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136 135 134 133
## [17,] 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
##       V19 V20 V21 V22 V23 V24 V25
##  [1,]   0   0   0   0   0   0   0
##  [2,] 482 481 480 479 478 477 476
##  [3,] 469 470 471 472 473 474 475
##  [4,] 432 431 430 429 428 427 426
##  [5,] 419 420 421 422 423 424 425
##  [6,] 382 381 380 379 378 377 376
##  [7,] 369 370 371 372 373 374 375
##  [8,] 332 331 330 329 328 327 326
##  [9,] 319 320 321 322 323 324 325
## [10,] 282 281 280 279 278 277 276
## [11,] 269 270 271 272 273 274 275
## [12,] 232 231 230 229 228 227 226
## [13,] 219 220 221 222 223 224 225
## [14,] 182 181 180 179 178 177 176
## [15,] 169 170 171 172 173 174 175
## [16,] 132 131 130 129 128 127 126
## [17,] 119 120 121 122 123 124 125
## 
## RCBD_g> head(ARCBD2$fieldBook, 12)
##    ID  EXPT LOCATION YEAR PLOT ROW COLUMN CHECKS BLOCK ENTRY TREATMENT
## 1   1 Expt1        A 2024  101   1      1      0     1   345      G345
## 2   2 Expt1        A 2024  102   1      2      0     1   130      G130
## 3   3 Expt1        A 2024  103   1      3      1     1     4       CH4
## 4   4 Expt1        A 2024  104   1      4      0     1   162      G162
## 5   5 Expt1        A 2024  105   1      5      1     1     1       CH1
## 6   6 Expt1        A 2024  106   1      6      0     1   123      G123
## 7   7 Expt1        A 2024  107   1      7      1     1     2       CH2
## 8   8 Expt1        A 2024  108   1      8      0     1    39       G39
## 9   9 Expt1        A 2024  109   1      9      0     1     9        G9
## 10 10 Expt1        A 2024  110   1     10      0     1   302      G302
## 11 11 Expt1        A 2024  111   1     11      0     1   210      G210
## 12 12 Expt1        A 2024  112   1     12      0     1   352      G352
plt <- plot(ARCBD2)

p <- full_control_positions(plt$field_book[plt$field_book$LOCATION == "A",], "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT") + guides(fill = "none")
##      ID  EXPT LOCATION YEAR PLOT ROW COLUMN CHECKS BLOCK ENTRY TREATMENT
## 1     1 Expt1        A 2024  101   1      1      0     1   345      G345
## 2     2 Expt1        A 2024  102   1      2      0     1   130      G130
## 3     3 Expt1        A 2024  103   1      3      1     1     4       CH4
## 4     4 Expt1        A 2024  104   1      4      0     1   162      G162
## 5     5 Expt1        A 2024  105   1      5      1     1     1       CH1
## 6     6 Expt1        A 2024  106   1      6      0     1   123      G123
## 7     7 Expt1        A 2024  107   1      7      1     1     2       CH2
## 8     8 Expt1        A 2024  108   1      8      0     1    39       G39
## 9     9 Expt1        A 2024  109   1      9      0     1     9        G9
## 10   10 Expt1        A 2024  110   1     10      0     1   302      G302
## 11   11 Expt1        A 2024  111   1     11      0     1   210      G210
## 12   12 Expt1        A 2024  112   1     12      0     1   352      G352
## 13   13 Expt1        A 2024  113   1     13      0     1   138      G138
## 14   14 Expt1        A 2024  114   1     14      0     1   297      G297
## 15   15 Expt1        A 2024  115   1     15      0     1   330      G330
## 16   16 Expt1        A 2024  116   1     16      1     1     3       CH3
## 17   17 Expt1        A 2024  117   1     17      0     1   256      G256
## 18   18 Expt1        A 2024  118   1     18      0     1    90       G90
## 19   19 Expt1        A 2024  119   1     19      0     1   184      G184
## 20   20 Expt1        A 2024  120   1     20      0     1   196      G196
## 21   21 Expt1        A 2024  121   1     21      0     1   218      G218
## 22   22 Expt1        A 2024  122   1     22      0     1   344      G344
## 23   23 Expt1        A 2024  123   1     23      0     1   299      G299
## 24   24 Expt1        A 2024  124   1     24      0     1   182      G182
## 25   25 Expt1        A 2024  125   1     25      0     1   112      G112
## 26   26 Expt1        A 2024  126   2     25      0     2     8        G8
## 27   27 Expt1        A 2024  127   2     24      0     2   296      G296
## 28   28 Expt1        A 2024  128   2     23      0     2   137      G137
## 29   29 Expt1        A 2024  129   2     22      0     2   204      G204
## 30   30 Expt1        A 2024  130   2     21      0     2   264      G264
## 31   31 Expt1        A 2024  131   2     20      0     2    70       G70
## 32   32 Expt1        A 2024  132   2     19      0     2   326      G326
## 33   33 Expt1        A 2024  133   2     18      1     2     2       CH2
## 34   34 Expt1        A 2024  134   2     17      0     2   287      G287
## 35   35 Expt1        A 2024  135   2     16      0     2   151      G151
## 36   36 Expt1        A 2024  136   2     15      0     2   295      G295
## 37   37 Expt1        A 2024  137   2     14      0     2    48       G48
## 38   38 Expt1        A 2024  138   2     13      1     2     4       CH4
## 39   39 Expt1        A 2024  139   2     12      1     2     3       CH3
## 40   40 Expt1        A 2024  140   2     11      0     2   139      G139
## 41   41 Expt1        A 2024  141   2     10      0     2   224      G224
## 42   42 Expt1        A 2024  142   2      9      0     2   328      G328
## 43   43 Expt1        A 2024  143   2      8      0     2   116      G116
## 44   44 Expt1        A 2024  144   2      7      1     2     1       CH1
## 45   45 Expt1        A 2024  145   2      6      0     2    86       G86
## 46   46 Expt1        A 2024  146   2      5      0     2   298      G298
## 47   47 Expt1        A 2024  147   2      4      0     2   215      G215
## 48   48 Expt1        A 2024  148   2      3      0     2   346      G346
## 49   49 Expt1        A 2024  149   2      2      0     2   347      G347
## 50   50 Expt1        A 2024  150   2      1      0     2   172      G172
## 51   51 Expt1        A 2024  151   3      1      0     3   268      G268
## 52   52 Expt1        A 2024  152   3      2      0     3   209      G209
## 53   53 Expt1        A 2024  153   3      3      1     3     4       CH4
## 54   54 Expt1        A 2024  154   3      4      0     3   185      G185
## 55   55 Expt1        A 2024  155   3      5      0     3   308      G308
## 56   56 Expt1        A 2024  156   3      6      0     3   115      G115
## 57   57 Expt1        A 2024  157   3      7      0     3    81       G81
## 58   58 Expt1        A 2024  158   3      8      0     3   342      G342
## 59   59 Expt1        A 2024  159   3      9      0     3   249      G249
## 60   60 Expt1        A 2024  160   3     10      0     3   258      G258
## 61   61 Expt1        A 2024  161   3     11      0     3   120      G120
## 62   62 Expt1        A 2024  162   3     12      1     3     1       CH1
## 63   63 Expt1        A 2024  163   3     13      1     3     2       CH2
## 64   64 Expt1        A 2024  164   3     14      0     3   294      G294
## 65   65 Expt1        A 2024  165   3     15      0     3    89       G89
## 66   66 Expt1        A 2024  166   3     16      0     3   269      G269
## 67   67 Expt1        A 2024  167   3     17      0     3    29       G29
## 68   68 Expt1        A 2024  168   3     18      0     3    26       G26
## 69   69 Expt1        A 2024  169   3     19      0     3   286      G286
## 70   70 Expt1        A 2024  170   3     20      0     3   290      G290
## 71   71 Expt1        A 2024  171   3     21      0     3   336      G336
## 72   72 Expt1        A 2024  172   3     22      0     3    80       G80
## 73   73 Expt1        A 2024  173   3     23      1     3     3       CH3
## 74   74 Expt1        A 2024  174   3     24      0     3   149      G149
## 75   75 Expt1        A 2024  175   3     25      0     3   312      G312
## 76   76 Expt1        A 2024  176   4     25      0     4    20       G20
## 77   77 Expt1        A 2024  177   4     24      0     4   166      G166
## 78   78 Expt1        A 2024  178   4     23      0     4   354      G354
## 79   79 Expt1        A 2024  179   4     22      0     4   233      G233
## 80   80 Expt1        A 2024  180   4     21      1     4     1       CH1
## 81   81 Expt1        A 2024  181   4     20      0     4   304      G304
## 82   82 Expt1        A 2024  182   4     19      0     4   206      G206
## 83   83 Expt1        A 2024  183   4     18      1     4     4       CH4
## 84   84 Expt1        A 2024  184   4     17      0     4     6        G6
## 85   85 Expt1        A 2024  185   4     16      0     4   301      G301
## 86   86 Expt1        A 2024  186   4     15      0     4   353      G353
## 87   87 Expt1        A 2024  187   4     14      0     4    19       G19
## 88   88 Expt1        A 2024  188   4     13      1     4     3       CH3
## 89   89 Expt1        A 2024  189   4     12      0     4   320      G320
## 90   90 Expt1        A 2024  190   4     11      0     4    94       G94
## 91   91 Expt1        A 2024  191   4     10      0     4   144      G144
## 92   92 Expt1        A 2024  192   4      9      0     4   141      G141
## 93   93 Expt1        A 2024  193   4      8      0     4   271      G271
## 94   94 Expt1        A 2024  194   4      7      0     4   143      G143
## 95   95 Expt1        A 2024  195   4      6      0     4    83       G83
## 96   96 Expt1        A 2024  196   4      5      0     4   161      G161
## 97   97 Expt1        A 2024  197   4      4      0     4   289      G289
## 98   98 Expt1        A 2024  198   4      3      1     4     2       CH2
## 99   99 Expt1        A 2024  199   4      2      0     4   195      G195
## 100 100 Expt1        A 2024  200   4      1      0     4   160      G160
## 101 101 Expt1        A 2024  201   5      1      0     5   234      G234
## 102 102 Expt1        A 2024  202   5      2      0     5    56       G56
## 103 103 Expt1        A 2024  203   5      3      0     5   349      G349
## 104 104 Expt1        A 2024  204   5      4      0     5   288      G288
## 105 105 Expt1        A 2024  205   5      5      0     5   202      G202
## 106 106 Expt1        A 2024  206   5      6      0     5   300      G300
## 107 107 Expt1        A 2024  207   5      7      0     5    79       G79
## 108 108 Expt1        A 2024  208   5      8      0     5    87       G87
## 109 109 Expt1        A 2024  209   5      9      0     5   157      G157
## 110 110 Expt1        A 2024  210   5     10      0     5    64       G64
## 111 111 Expt1        A 2024  211   5     11      0     5   168      G168
## 112 112 Expt1        A 2024  212   5     12      1     5     1       CH1
## 113 113 Expt1        A 2024  213   5     13      1     5     4       CH4
## 114 114 Expt1        A 2024  214   5     14      0     5   220      G220
## 115 115 Expt1        A 2024  215   5     15      0     5    34       G34
## 116 116 Expt1        A 2024  216   5     16      0     5   131      G131
## 117 117 Expt1        A 2024  217   5     17      0     5   262      G262
## 118 118 Expt1        A 2024  218   5     18      1     5     3       CH3
## 119 119 Expt1        A 2024  219   5     19      0     5   180      G180
## 120 120 Expt1        A 2024  220   5     20      0     5   129      G129
## 121 121 Expt1        A 2024  221   5     21      0     5   145      G145
## 122 122 Expt1        A 2024  222   5     22      1     5     2       CH2
## 123 123 Expt1        A 2024  223   5     23      0     5   212      G212
## 124 124 Expt1        A 2024  224   5     24      0     5    91       G91
## 125 125 Expt1        A 2024  225   5     25      0     5   278      G278
## 126 126 Expt1        A 2024  226   6     25      0     6    84       G84
## 127 127 Expt1        A 2024  227   6     24      0     6   334      G334
## 128 128 Expt1        A 2024  228   6     23      0     6   171      G171
## 129 129 Expt1        A 2024  229   6     22      0     6   343      G343
## 130 130 Expt1        A 2024  230   6     21      0     6   280      G280
## 131 131 Expt1        A 2024  231   6     20      0     6   292      G292
## 132 132 Expt1        A 2024  232   6     19      0     6   317      G317
## 133 133 Expt1        A 2024  233   6     18      0     6    51       G51
## 134 134 Expt1        A 2024  234   6     17      0     6   146      G146
## 135 135 Expt1        A 2024  235   6     16      0     6   165      G165
## 136 136 Expt1        A 2024  236   6     15      0     6    41       G41
## 137 137 Expt1        A 2024  237   6     14      0     6   156      G156
## 138 138 Expt1        A 2024  238   6     13      0     6   276      G276
## 139 139 Expt1        A 2024  239   6     12      0     6   240      G240
## 140 140 Expt1        A 2024  240   6     11      1     6     3       CH3
## 141 141 Expt1        A 2024  241   6     10      0     6   285      G285
## 142 142 Expt1        A 2024  242   6      9      0     6   270      G270
## 143 143 Expt1        A 2024  243   6      8      1     6     1       CH1
## 144 144 Expt1        A 2024  244   6      7      1     6     4       CH4
## 145 145 Expt1        A 2024  245   6      6      1     6     2       CH2
## 146 146 Expt1        A 2024  246   6      5      0     6   274      G274
## 147 147 Expt1        A 2024  247   6      4      0     6   102      G102
## 148 148 Expt1        A 2024  248   6      3      0     6   153      G153
## 149 149 Expt1        A 2024  249   6      2      0     6    75       G75
## 150 150 Expt1        A 2024  250   6      1      0     6   133      G133
## 151 151 Expt1        A 2024  251   7      1      1     7     2       CH2
## 152 152 Expt1        A 2024  252   7      2      0     7   239      G239
## 153 153 Expt1        A 2024  253   7      3      0     7   252      G252
## 154 154 Expt1        A 2024  254   7      4      0     7   213      G213
## 155 155 Expt1        A 2024  255   7      5      0     7   261      G261
## 156 156 Expt1        A 2024  256   7      6      0     7   150      G150
## 157 157 Expt1        A 2024  257   7      7      1     7     3       CH3
## 158 158 Expt1        A 2024  258   7      8      0     7   266      G266
## 159 159 Expt1        A 2024  259   7      9      0     7   277      G277
## 160 160 Expt1        A 2024  260   7     10      0     7   307      G307
## 161 161 Expt1        A 2024  261   7     11      1     7     4       CH4
## 162 162 Expt1        A 2024  262   7     12      0     7    95       G95
## 163 163 Expt1        A 2024  263   7     13      0     7   311      G311
## 164 164 Expt1        A 2024  264   7     14      0     7   313      G313
## 165 165 Expt1        A 2024  265   7     15      0     7    60       G60
## 166 166 Expt1        A 2024  266   7     16      0     7   293      G293
## 167 167 Expt1        A 2024  267   7     17      0     7    38       G38
## 168 168 Expt1        A 2024  268   7     18      0     7    59       G59
## 169 169 Expt1        A 2024  269   7     19      0     7    67       G67
## 170 170 Expt1        A 2024  270   7     20      0     7   232      G232
## 171 171 Expt1        A 2024  271   7     21      0     7   134      G134
## 172 172 Expt1        A 2024  272   7     22      1     7     1       CH1
## 173 173 Expt1        A 2024  273   7     23      0     7   178      G178
## 174 174 Expt1        A 2024  274   7     24      0     7    93       G93
## 175 175 Expt1        A 2024  275   7     25      0     7   114      G114
## 176 176 Expt1        A 2024  276   8     25      0     8   351      G351
## 177 177 Expt1        A 2024  277   8     24      0     8   194      G194
## 178 178 Expt1        A 2024  278   8     23      0     8    15       G15
## 179 179 Expt1        A 2024  279   8     22      0     8   183      G183
## 180 180 Expt1        A 2024  280   8     21      0     8   226      G226
## 181 181 Expt1        A 2024  281   8     20      0     8   214      G214
## 182 182 Expt1        A 2024  282   8     19      1     8     3       CH3
## 183 183 Expt1        A 2024  283   8     18      1     8     1       CH1
## 184 184 Expt1        A 2024  284   8     17      1     8     2       CH2
## 185 185 Expt1        A 2024  285   8     16      0     8   121      G121
## 186 186 Expt1        A 2024  286   8     15      0     8   333      G333
## 187 187 Expt1        A 2024  287   8     14      0     8   221      G221
## 188 188 Expt1        A 2024  288   8     13      0     8   135      G135
## 189 189 Expt1        A 2024  289   8     12      0     8    18       G18
## 190 190 Expt1        A 2024  290   8     11      0     8   309      G309
## 191 191 Expt1        A 2024  291   8     10      0     8   174      G174
## 192 192 Expt1        A 2024  292   8      9      0     8   100      G100
## 193 193 Expt1        A 2024  293   8      8      0     8   109      G109
## 194 194 Expt1        A 2024  294   8      7      0     8    71       G71
## 195 195 Expt1        A 2024  295   8      6      0     8    33       G33
## 196 196 Expt1        A 2024  296   8      5      0     8   163      G163
## 197 197 Expt1        A 2024  297   8      4      1     8     4       CH4
## 198 198 Expt1        A 2024  298   8      3      0     8   186      G186
## 199 199 Expt1        A 2024  299   8      2      0     8   321      G321
## 200 200 Expt1        A 2024  300   8      1      0     8   107      G107
## 201 201 Expt1        A 2024  301   9      1      1     9     4       CH4
## 202 202 Expt1        A 2024  302   9      2      1     9     2       CH2
## 203 203 Expt1        A 2024  303   9      3      0     9    25       G25
## 204 204 Expt1        A 2024  304   9      4      0     9   103      G103
## 205 205 Expt1        A 2024  305   9      5      0     9    36       G36
## 206 206 Expt1        A 2024  306   9      6      0     9   155      G155
## 207 207 Expt1        A 2024  307   9      7      0     9   260      G260
## 208 208 Expt1        A 2024  308   9      8      0     9   246      G246
## 209 209 Expt1        A 2024  309   9      9      0     9   189      G189
## 210 210 Expt1        A 2024  310   9     10      0     9    49       G49
## 211 211 Expt1        A 2024  311   9     11      0     9   197      G197
## 212 212 Expt1        A 2024  312   9     12      0     9   284      G284
## 213 213 Expt1        A 2024  313   9     13      0     9   242      G242
## 214 214 Expt1        A 2024  314   9     14      0     9   335      G335
## 215 215 Expt1        A 2024  315   9     15      0     9   217      G217
## 216 216 Expt1        A 2024  316   9     16      0     9   319      G319
## 217 217 Expt1        A 2024  317   9     17      0     9   200      G200
## 218 218 Expt1        A 2024  318   9     18      1     9     3       CH3
## 219 219 Expt1        A 2024  319   9     19      0     9   152      G152
## 220 220 Expt1        A 2024  320   9     20      0     9    97       G97
## 221 221 Expt1        A 2024  321   9     21      0     9   267      G267
## 222 222 Expt1        A 2024  322   9     22      0     9    44       G44
## 223 223 Expt1        A 2024  323   9     23      0     9   275      G275
## 224 224 Expt1        A 2024  324   9     24      0     9    92       G92
## 225 225 Expt1        A 2024  325   9     25      1     9     1       CH1
## 226 226 Expt1        A 2024  326  10     25      0    10   175      G175
## 227 227 Expt1        A 2024  327  10     24      0    10   272      G272
## 228 228 Expt1        A 2024  328  10     23      0    10    10       G10
## 229 229 Expt1        A 2024  329  10     22      0    10   104      G104
## 230 230 Expt1        A 2024  330  10     21      0    10    88       G88
## 231 231 Expt1        A 2024  331  10     20      0    10   181      G181
## 232 232 Expt1        A 2024  332  10     19      0    10   118      G118
## 233 233 Expt1        A 2024  333  10     18      0    10   203      G203
## 234 234 Expt1        A 2024  334  10     17      1    10     2       CH2
## 235 235 Expt1        A 2024  335  10     16      0    10   323      G323
## 236 236 Expt1        A 2024  336  10     15      0    10   227      G227
## 237 237 Expt1        A 2024  337  10     14      1    10     1       CH1
## 238 238 Expt1        A 2024  338  10     13      0    10   348      G348
## 239 239 Expt1        A 2024  339  10     12      0    10   191      G191
## 240 240 Expt1        A 2024  340  10     11      0    10   244      G244
## 241 241 Expt1        A 2024  341  10     10      1    10     4       CH4
## 242 242 Expt1        A 2024  342  10      9      0    10   193      G193
## 243 243 Expt1        A 2024  343  10      8      0    10   177      G177
## 244 244 Expt1        A 2024  344  10      7      0    10    96       G96
## 245 245 Expt1        A 2024  345  10      6      1    10     3       CH3
## 246 246 Expt1        A 2024  346  10      5      0    10    78       G78
## 247 247 Expt1        A 2024  347  10      4      0    10   327      G327
## 248 248 Expt1        A 2024  348  10      3      0    10   338      G338
## 249 249 Expt1        A 2024  349  10      2      0    10   154      G154
## 250 250 Expt1        A 2024  350  10      1      0    10   173      G173
## 251 251 Expt1        A 2024  351  11      1      0    11   110      G110
## 252 252 Expt1        A 2024  352  11      2      0    11   125      G125
## 253 253 Expt1        A 2024  353  11      3      0    11    85       G85
## 254 254 Expt1        A 2024  354  11      4      0    11   332      G332
## 255 255 Expt1        A 2024  355  11      5      0    11   250      G250
## 256 256 Expt1        A 2024  356  11      6      0    11   248      G248
## 257 257 Expt1        A 2024  357  11      7      0    11   265      G265
## 258 258 Expt1        A 2024  358  11      8      0    11   255      G255
## 259 259 Expt1        A 2024  359  11      9      1    11     2       CH2
## 260 260 Expt1        A 2024  360  11     10      0    11   251      G251
## 261 261 Expt1        A 2024  361  11     11      0    11    52       G52
## 262 262 Expt1        A 2024  362  11     12      0    11    42       G42
## 263 263 Expt1        A 2024  363  11     13      0    11   236      G236
## 264 264 Expt1        A 2024  364  11     14      0    11    35       G35
## 265 265 Expt1        A 2024  365  11     15      1    11     1       CH1
## 266 266 Expt1        A 2024  366  11     16      0    11   216      G216
## 267 267 Expt1        A 2024  367  11     17      0    11    61       G61
## 268 268 Expt1        A 2024  368  11     18      1    11     3       CH3
## 269 269 Expt1        A 2024  369  11     19      1    11     4       CH4
## 270 270 Expt1        A 2024  370  11     20      0    11   230      G230
## 271 271 Expt1        A 2024  371  11     21      0    11    69       G69
## 272 272 Expt1        A 2024  372  11     22      0    11   245      G245
## 273 273 Expt1        A 2024  373  11     23      0    11   339      G339
## 274 274 Expt1        A 2024  374  11     24      0    11    98       G98
## 275 275 Expt1        A 2024  375  11     25      0    11    14       G14
## 276 276 Expt1        A 2024  376  12     25      0    12   254      G254
## 277 277 Expt1        A 2024  377  12     24      0    12   127      G127
## 278 278 Expt1        A 2024  378  12     23      0    12   106      G106
## 279 279 Expt1        A 2024  379  12     22      1    12     4       CH4
## 280 280 Expt1        A 2024  380  12     21      0    12   303      G303
## 281 281 Expt1        A 2024  381  12     20      1    12     3       CH3
## 282 282 Expt1        A 2024  382  12     19      0    12    21       G21
## 283 283 Expt1        A 2024  383  12     18      0    12   241      G241
## 284 284 Expt1        A 2024  384  12     17      0    12   243      G243
## 285 285 Expt1        A 2024  385  12     16      0    12    27       G27
## 286 286 Expt1        A 2024  386  12     15      1    12     1       CH1
## 287 287 Expt1        A 2024  387  12     14      0    12    32       G32
## 288 288 Expt1        A 2024  388  12     13      0    12    31       G31
## 289 289 Expt1        A 2024  389  12     12      0    12   273      G273
## 290 290 Expt1        A 2024  390  12     11      0    12   105      G105
## 291 291 Expt1        A 2024  391  12     10      0    12    58       G58
## 292 292 Expt1        A 2024  392  12      9      0    12   179      G179
## 293 293 Expt1        A 2024  393  12      8      0    12   124      G124
## 294 294 Expt1        A 2024  394  12      7      0    12   247      G247
## 295 295 Expt1        A 2024  395  12      6      1    12     2       CH2
## 296 296 Expt1        A 2024  396  12      5      0    12   315      G315
## 297 297 Expt1        A 2024  397  12      4      0    12   324      G324
## 298 298 Expt1        A 2024  398  12      3      0    12   192      G192
## 299 299 Expt1        A 2024  399  12      2      0    12   205      G205
## 300 300 Expt1        A 2024  400  12      1      0    12   282      G282
## 301 301 Expt1        A 2024  401  13      1      0    13   253      G253
## 302 302 Expt1        A 2024  402  13      2      1    13     2       CH2
## 303 303 Expt1        A 2024  403  13      3      0    13    68       G68
## 304 304 Expt1        A 2024  404  13      4      0    13   113      G113
## 305 305 Expt1        A 2024  405  13      5      0    13    13       G13
## 306 306 Expt1        A 2024  406  13      6      0    13   279      G279
## 307 307 Expt1        A 2024  407  13      7      0    13    47       G47
## 308 308 Expt1        A 2024  408  13      8      0    13    57       G57
## 309 309 Expt1        A 2024  409  13      9      1    13     4       CH4
## 310 310 Expt1        A 2024  410  13     10      0    13   132      G132
## 311 311 Expt1        A 2024  411  13     11      1    13     3       CH3
## 312 312 Expt1        A 2024  412  13     12      0    13   167      G167
## 313 313 Expt1        A 2024  413  13     13      0    13   159      G159
## 314 314 Expt1        A 2024  414  13     14      0    13    23       G23
## 315 315 Expt1        A 2024  415  13     15      1    13     1       CH1
## 316 316 Expt1        A 2024  416  13     16      0    13   148      G148
## 317 317 Expt1        A 2024  417  13     17      0    13   117      G117
## 318 318 Expt1        A 2024  418  13     18      0    13   201      G201
## 319 319 Expt1        A 2024  419  13     19      0    13    28       G28
## 320 320 Expt1        A 2024  420  13     20      0    13    11       G11
## 321 321 Expt1        A 2024  421  13     21      0    13   119      G119
## 322 322 Expt1        A 2024  422  13     22      0    13   190      G190
## 323 323 Expt1        A 2024  423  13     23      0    13    73       G73
## 324 324 Expt1        A 2024  424  13     24      0    13    72       G72
## 325 325 Expt1        A 2024  425  13     25      0    13    99       G99
## 326 326 Expt1        A 2024  426  14     25      0    14   223      G223
## 327 327 Expt1        A 2024  427  14     24      0    14   158      G158
## 328 328 Expt1        A 2024  428  14     23      1    14     3       CH3
## 329 329 Expt1        A 2024  429  14     22      0    14    46       G46
## 330 330 Expt1        A 2024  430  14     21      0    14   164      G164
## 331 331 Expt1        A 2024  431  14     20      1    14     4       CH4
## 332 332 Expt1        A 2024  432  14     19      1    14     1       CH1
## 333 333 Expt1        A 2024  433  14     18      0    14   199      G199
## 334 334 Expt1        A 2024  434  14     17      1    14     2       CH2
## 335 335 Expt1        A 2024  435  14     16      0    14     5        G5
## 336 336 Expt1        A 2024  436  14     15      0    14   310      G310
## 337 337 Expt1        A 2024  437  14     14      0    14   136      G136
## 338 338 Expt1        A 2024  438  14     13      0    14     7        G7
## 339 339 Expt1        A 2024  439  14     12      0    14   211      G211
## 340 340 Expt1        A 2024  440  14     11      0    14    53       G53
## 341 341 Expt1        A 2024  441  14     10      0    14   142      G142
## 342 342 Expt1        A 2024  442  14      9      0    14   283      G283
## 343 343 Expt1        A 2024  443  14      8      0    14   228      G228
## 344 344 Expt1        A 2024  444  14      7      0    14    82       G82
## 345 345 Expt1        A 2024  445  14      6      0    14   322      G322
## 346 346 Expt1        A 2024  446  14      5      0    14   140      G140
## 347 347 Expt1        A 2024  447  14      4      0    14    40       G40
## 348 348 Expt1        A 2024  448  14      3      0    14    62       G62
## 349 349 Expt1        A 2024  449  14      2      0    14    45       G45
## 350 350 Expt1        A 2024  450  14      1      0    14    63       G63
## 351 351 Expt1        A 2024  451  15      1      0    15   229      G229
## 352 352 Expt1        A 2024  452  15      2      0    15   231      G231
## 353 353 Expt1        A 2024  453  15      3      0    15    54       G54
## 354 354 Expt1        A 2024  454  15      4      1    15     3       CH3
## 355 355 Expt1        A 2024  455  15      5      0    15   305      G305
## 356 356 Expt1        A 2024  456  15      6      1    15     4       CH4
## 357 357 Expt1        A 2024  457  15      7      0    15   128      G128
## 358 358 Expt1        A 2024  458  15      8      0    15    50       G50
## 359 359 Expt1        A 2024  459  15      9      0    15    30       G30
## 360 360 Expt1        A 2024  460  15     10      0    15    55       G55
## 361 361 Expt1        A 2024  461  15     11      1    15     1       CH1
## 362 362 Expt1        A 2024  462  15     12      0    15   337      G337
## 363 363 Expt1        A 2024  463  15     13      0    15    24       G24
## 364 364 Expt1        A 2024  464  15     14      0    15   329      G329
## 365 365 Expt1        A 2024  465  15     15      0    15   263      G263
## 366 366 Expt1        A 2024  466  15     16      1    15     2       CH2
## 367 367 Expt1        A 2024  467  15     17      0    15    74       G74
## 368 368 Expt1        A 2024  468  15     18      0    15   108      G108
## 369 369 Expt1        A 2024  469  15     19      0    15   318      G318
## 370 370 Expt1        A 2024  470  15     20      0    15   350      G350
## 371 371 Expt1        A 2024  471  15     21      0    15   147      G147
## 372 372 Expt1        A 2024  472  15     22      0    15   306      G306
## 373 373 Expt1        A 2024  473  15     23      0    15   325      G325
## 374 374 Expt1        A 2024  474  15     24      0    15    37       G37
## 375 375 Expt1        A 2024  475  15     25      0    15    43       G43
## 376 376 Expt1        A 2024  476  16     25      0    16   281      G281
## 377 377 Expt1        A 2024  477  16     24      0    16    65       G65
## 378 378 Expt1        A 2024  478  16     23      0    16   237      G237
## 379 379 Expt1        A 2024  479  16     22      0    16   222      G222
## 380 380 Expt1        A 2024  480  16     21      0    16   169      G169
## 381 381 Expt1        A 2024  481  16     20      0    16   341      G341
## 382 382 Expt1        A 2024  482  16     19      1    16     4       CH4
## 383 383 Expt1        A 2024  483  16     18      0    16   316      G316
## 384 384 Expt1        A 2024  484  16     17      0    16   291      G291
## 385 385 Expt1        A 2024  485  16     16      0    16   111      G111
## 386 386 Expt1        A 2024  486  16     15      0    16   219      G219
## 387 387 Expt1        A 2024  487  16     14      1    16     3       CH3
## 388 388 Expt1        A 2024  488  16     13      0    16    16       G16
## 389 389 Expt1        A 2024  489  16     12      1    16     2       CH2
## 390 390 Expt1        A 2024  490  16     11      0    16   101      G101
## 391 391 Expt1        A 2024  491  16     10      0    16    76       G76
## 392 392 Expt1        A 2024  492  16      9      0    16   188      G188
## 393 393 Expt1        A 2024  493  16      8      0    16   340      G340
## 394 394 Expt1        A 2024  494  16      7      0    16    77       G77
## 395 395 Expt1        A 2024  495  16      6      0    16   235      G235
## 396 396 Expt1        A 2024  496  16      5      0    16    22       G22
## 397 397 Expt1        A 2024  497  16      4      0    16   314      G314
## 398 398 Expt1        A 2024  498  16      3      1    16     1       CH1
## 399 399 Expt1        A 2024  499  16      2      0    16    12       G12
## 400 400 Expt1        A 2024  500  16      1      0    16    17       G17
## 401 401 Expt1        A 2024    0  17     19     NA    17     0    Filler
## 402 402 Expt1        A 2024    0  17     20     NA    17     0    Filler
## 403 403 Expt1        A 2024    0  17     21     NA    17     0    Filler
## 404 404 Expt1        A 2024    0  17     22     NA    17     0    Filler
## 405 405 Expt1        A 2024    0  17     23     NA    17     0    Filler
## 406 406 Expt1        A 2024    0  17     24     NA    17     0    Filler
## 407 407 Expt1        A 2024    0  17     25     NA    17     0    Filler
## 408 408 Expt1        A 2024  501  17      1      0    17   257      G257
## 409 409 Expt1        A 2024  502  17      2      0    17   259      G259
## 410 410 Expt1        A 2024  503  17      3      1    17     1       CH1
## 411 411 Expt1        A 2024  504  17      4      0    17   198      G198
## 412 412 Expt1        A 2024  505  17      5      0    17   331      G331
## 413 413 Expt1        A 2024  506  17      6      0    17    66       G66
## 414 414 Expt1        A 2024  507  17      7      1    17     3       CH3
## 415 415 Expt1        A 2024  508  17      8      0    17   238      G238
## 416 416 Expt1        A 2024  509  17      9      0    17   170      G170
## 417 417 Expt1        A 2024  510  17     10      0    17   176      G176
## 418 418 Expt1        A 2024  511  17     11      0    17   126      G126
## 419 419 Expt1        A 2024  512  17     12      0    17   207      G207
## 420 420 Expt1        A 2024  513  17     13      0    17   225      G225
## 421 421 Expt1        A 2024  514  17     14      0    17   122      G122
## 422 422 Expt1        A 2024  515  17     15      1    17     4       CH4
## 423 423 Expt1        A 2024  516  17     16      0    17   208      G208
## 424 424 Expt1        A 2024  517  17     17      0    17   187      G187
## 425 425 Expt1        A 2024  518  17     18      1    17     2       CH2
p

# Example 7: Rectangular Lattice Design

example("rectangular_lattice")
## 
## rctng_> # Example 1: Generates a rectangular lattice design with 6 full blocks, 4 units per IBlock (k)
## rctng_> # and 20 treatments in one location.
## rctng_> rectangularLattice1 <- rectangular_lattice(t = 20, k = 4, r = 6, l = 1, 
## rctng_+                                            plotNumber = 101,
## rctng_+                                            locationNames = "FARGO", 
## rctng_+                                            seed = 126)
## 
## rctng_> rectangularLattice1$infoDesign
## $Reps
## [1] 6
## 
## $iBlocks
## [1] 5
## 
## $NumberTreatments
## [1] 20
## 
## $NumberLocations
## [1] 1
## 
## $Locations
## [1] "FARGO"
## 
## $seed
## [1] 126
## 
## $lambda
## [1] 0.9473684
## 
## $id_design
## [1] 11
## 
## 
## rctng_> head(rectangularLattice1$fieldBook,12)
##    ID LOCATION PLOT REP IBLOCK UNIT ENTRY TREATMENT
## 1   1    FARGO  101   1      1    1    15      G-15
## 2   2    FARGO  102   1      1    2    13      G-13
## 3   3    FARGO  103   1      1    3    12      G-12
## 4   4    FARGO  104   1      1    4    16      G-16
## 5   5    FARGO  105   1      2    1    19      G-19
## 6   6    FARGO  106   1      2    2    17      G-17
## 7   7    FARGO  107   1      2    3    10      G-10
## 8   8    FARGO  108   1      2    4    14      G-14
## 9   9    FARGO  109   1      3    1    11      G-11
## 10 10    FARGO  110   1      3    2     8       G-8
## 11 11    FARGO  111   1      3    3     5       G-5
## 12 12    FARGO  112   1      3    4    20      G-20
## 
## rctng_> # Example 2: Generates a rectangular lattice design with 5 full blocks, 7 units per IBlock (k)
## rctng_> # and 56 treatments across 2 locations.
## rctng_> # In this case, we show how to use the option data.
## rctng_> treatments <- paste("ND-", 1:56, sep = "")
## 
## rctng_> ENTRY <- 1:56
## 
## rctng_> treatment_list <- data.frame(list(ENTRY = ENTRY, TREATMENT = treatments))
## 
## rctng_> 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
## 
## rctng_> rectangularLattice2 <- rectangular_lattice(t = 56, k = 7, r = 5, l = 2, 
## rctng_+                                            plotNumber = c(1001,2001),
## rctng_+                                            locationNames = c("Loc1", "Loc2"), 
## rctng_+                                            seed = 127,
## rctng_+                                            data = treatment_list)
## 
## rctng_> rectangularLattice2$infoDesign
## $Reps
## [1] 5
## 
## $iBlocks
## [1] 8
## 
## $NumberTreatments
## [1] 56
## 
## $NumberLocations
## [1] 2
## 
## $Locations
## [1] "LOC1" "LOC2"
## 
## $seed
## [1] 127
## 
## $lambda
## [1] 0.5454545
## 
## $id_design
## [1] 11
## 
## 
## rctng_> head(rectangularLattice2$fieldBook,12)
##    ID LOCATION PLOT REP IBLOCK UNIT ENTRY TREATMENT
## 1   1     LOC1 1001   1      1    1     8      ND-8
## 2   2     LOC1 1002   1      1    2    35     ND-35
## 3   3     LOC1 1003   1      1    3    52     ND-52
## 4   4     LOC1 1004   1      1    4    29     ND-29
## 5   5     LOC1 1005   1      1    5    41     ND-41
## 6   6     LOC1 1006   1      1    6    22     ND-22
## 7   7     LOC1 1007   1      1    7    10     ND-10
## 8   8     LOC1 1008   1      2    1    45     ND-45
## 9   9     LOC1 1009   1      2    2    11     ND-11
## 10 10     LOC1 1010   1      2    3     6      ND-6
## 11 11     LOC1 1011   1      2    4    25     ND-25
## 12 12     LOC1 1012   1      2    5    34     ND-34
plt <- plot(rectangularLattice2)

p <- full_control_positions(plt$field_book[plt$field_book$LOCATION == "LOC1",], "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT")
##      ID LOCATION PLOT ROW COLUMN REP IBLOCK UNIT ENTRY TREATMENT
## 1     1     LOC1 1001   1      1   1      1    1     8      ND-8
## 2     8     LOC1 1002   1      2   1      2    1    45     ND-45
## 3    15     LOC1 1003   1      3   1      3    1    30     ND-30
## 4    22     LOC1 1004   1      4   1      4    1    15     ND-15
## 5    29     LOC1 1005   1      5   1      5    1     2      ND-2
## 6    36     LOC1 1006   1      6   1      6    1    27     ND-27
## 7    43     LOC1 1007   1      7   1      7    1    13     ND-13
## 8    50     LOC1 1008   1      8   1      8    1    14     ND-14
## 9     2     LOC1 1016   2      1   1      1    2    35     ND-35
## 10    9     LOC1 1015   2      2   1      2    2    11     ND-11
## 11   16     LOC1 1014   2      3   1      3    2    39     ND-39
## 12   23     LOC1 1013   2      4   1      4    2    36     ND-36
## 13   30     LOC1 1012   2      5   1      5    2    38     ND-38
## 14   37     LOC1 1011   2      6   1      6    2    42     ND-42
## 15   44     LOC1 1010   2      7   1      7    2    33     ND-33
## 16   51     LOC1 1009   2      8   1      8    2     3      ND-3
## 17    3     LOC1 1017   3      1   1      1    3    52     ND-52
## 18   10     LOC1 1018   3      2   1      2    3     6      ND-6
## 19   17     LOC1 1019   3      3   1      3    3    50     ND-50
## 20   24     LOC1 1020   3      4   1      4    3     5      ND-5
## 21   31     LOC1 1021   3      5   1      5    3    19     ND-19
## 22   38     LOC1 1022   3      6   1      6    3     9      ND-9
## 23   45     LOC1 1023   3      7   1      7    3    43     ND-43
## 24   52     LOC1 1024   3      8   1      8    3    53     ND-53
## 25    4     LOC1 1032   4      1   1      1    4    29     ND-29
## 26   11     LOC1 1031   4      2   1      2    4    25     ND-25
## 27   18     LOC1 1030   4      3   1      3    4    48     ND-48
## 28   25     LOC1 1029   4      4   1      4    4    17     ND-17
## 29   32     LOC1 1028   4      5   1      5    4    31     ND-31
## 30   39     LOC1 1027   4      6   1      6    4     4      ND-4
## 31   46     LOC1 1026   4      7   1      7    4    20     ND-20
## 32   53     LOC1 1025   4      8   1      8    4    47     ND-47
## 33    5     LOC1 1033   5      1   1      1    5    41     ND-41
## 34   12     LOC1 1034   5      2   1      2    5    34     ND-34
## 35   19     LOC1 1035   5      3   1      3    5    12     ND-12
## 36   26     LOC1 1036   5      4   1      4    5    46     ND-46
## 37   33     LOC1 1037   5      5   1      5    5    16     ND-16
## 38   40     LOC1 1038   5      6   1      6    5    37     ND-37
## 39   47     LOC1 1039   5      7   1      7    5    54     ND-54
## 40   54     LOC1 1040   5      8   1      8    5    18     ND-18
## 41    6     LOC1 1048   6      1   1      1    6    22     ND-22
## 42   13     LOC1 1047   6      2   1      2    6    24     ND-24
## 43   20     LOC1 1046   6      3   1      3    6    21     ND-21
## 44   27     LOC1 1045   6      4   1      4    6    32     ND-32
## 45   34     LOC1 1044   6      5   1      5    6    49     ND-49
## 46   41     LOC1 1043   6      6   1      6    6    56     ND-56
## 47   48     LOC1 1042   6      7   1      7    6     7      ND-7
## 48   55     LOC1 1041   6      8   1      8    6    40     ND-40
## 49    7     LOC1 1049   7      1   1      1    7    10     ND-10
## 50   14     LOC1 1050   7      2   1      2    7    55     ND-55
## 51   21     LOC1 1051   7      3   1      3    7     1      ND-1
## 52   28     LOC1 1052   7      4   1      4    7    51     ND-51
## 53   35     LOC1 1053   7      5   1      5    7    44     ND-44
## 54   42     LOC1 1054   7      6   1      6    7    23     ND-23
## 55   49     LOC1 1055   7      7   1      7    7    26     ND-26
## 56   56     LOC1 1056   7      8   1      8    7    28     ND-28
## 57   57     LOC1 1108   8      1   2      1    1    53     ND-53
## 58   64     LOC1 1107   8      2   2      2    1    19     ND-19
## 59   71     LOC1 1106   8      3   2      3    1    49     ND-49
## 60   78     LOC1 1105   8      4   2      4    1    50     ND-50
## 61   85     LOC1 1104   8      5   2      5    1    12     ND-12
## 62   92     LOC1 1103   8      6   2      6    1    16     ND-16
## 63   99     LOC1 1102   8      7   2      7    1    30     ND-30
## 64  106     LOC1 1101   8      8   2      8    1    55     ND-55
## 65   58     LOC1 1109   9      1   2      1    2    45     ND-45
## 66   65     LOC1 1110   9      2   2      2    2    11     ND-11
## 67   72     LOC1 1111   9      3   2      3    2    41     ND-41
## 68   79     LOC1 1112   9      4   2      4    2     2      ND-2
## 69   86     LOC1 1113   9      5   2      5    2     4      ND-4
## 70   93     LOC1 1114   9      6   2      6    2    32     ND-32
## 71  100     LOC1 1115   9      7   2      7    2    38     ND-38
## 72  107     LOC1 1116   9      8   2      8    2    15     ND-15
## 73   59     LOC1 1124  10      1   2      1    3    21     ND-21
## 74   66     LOC1 1123  10      2   2      2    3    51     ND-51
## 75   73     LOC1 1122  10      3   2      3    3    25     ND-25
## 76   80     LOC1 1121  10      4   2      4    3    42     ND-42
## 77   87     LOC1 1120  10      5   2      5    3    36     ND-36
## 78   94     LOC1 1119  10      6   2      6    3    48     ND-48
## 79  101     LOC1 1118  10      7   2      7    3    46     ND-46
## 80  108     LOC1 1117  10      8   2      8    3    23     ND-23
## 81   60     LOC1 1125  11      1   2      1    4    29     ND-29
## 82   67     LOC1 1126  11      2   2      2    4    35     ND-35
## 83   74     LOC1 1127  11      3   2      3    4    17     ND-17
## 84   81     LOC1 1128  11      4   2      4    4    26     ND-26
## 85   88     LOC1 1129  11      5   2      5    4    52     ND-52
## 86   95     LOC1 1130  11      6   2      6    4     8      ND-8
## 87  102     LOC1 1131  11      7   2      7    4    14     ND-14
## 88  109     LOC1 1132  11      8   2      8    4    47     ND-47
## 89   61     LOC1 1140  12      1   2      1    5    37     ND-37
## 90   68     LOC1 1139  12      2   2      2    5     3      ND-3
## 91   75     LOC1 1138  12      3   2      3    5     9      ND-9
## 92   82     LOC1 1137  12      4   2      4    5    10     ND-10
## 93   89     LOC1 1136  12      5   2      5    5    20     ND-20
## 94   96     LOC1 1135  12      6   2      6    5    24     ND-24
## 95  103     LOC1 1134  12      7   2      7    5    54     ND-54
## 96  110     LOC1 1133  12      8   2      8    5    39     ND-39
## 97   62     LOC1 1141  13      1   2      1    6     5      ND-5
## 98   69     LOC1 1142  13      2   2      2    6    27     ND-27
## 99   76     LOC1 1143  13      3   2      3    6     1      ND-1
## 100  83     LOC1 1144  13      4   2      4    6    18     ND-18
## 101  90     LOC1 1145  13      5   2      5    6    28     ND-28
## 102  97     LOC1 1146  13      6   2      6    6    40     ND-40
## 103 104     LOC1 1147  13      7   2      7    6    22     ND-22
## 104 111     LOC1 1148  13      8   2      8    6    31     ND-31
## 105  63     LOC1 1156  14      1   2      1    7    13     ND-13
## 106  70     LOC1 1155  14      2   2      2    7    43     ND-43
## 107  77     LOC1 1154  14      3   2      3    7    33     ND-33
## 108  84     LOC1 1153  14      4   2      4    7    34     ND-34
## 109  91     LOC1 1152  14      5   2      5    7    44     ND-44
## 110  98     LOC1 1151  14      6   2      6    7    56     ND-56
## 111 105     LOC1 1150  14      7   2      7    7     6      ND-6
## 112 112     LOC1 1149  14      8   2      8    7     7      ND-7
## 113 113     LOC1 1201  15      1   3      1    1    44     ND-44
## 114 120     LOC1 1202  15      2   3      2    1     7      ND-7
## 115 127     LOC1 1203  15      3   3      3    1    29     ND-29
## 116 134     LOC1 1204  15      4   3      4    1    14     ND-14
## 117 141     LOC1 1205  15      5   3      5    1    30     ND-30
## 118 148     LOC1 1206  15      6   3      6    1    19     ND-19
## 119 155     LOC1 1207  15      7   3      7    1    22     ND-22
## 120 162     LOC1 1208  15      8   3      8    1    46     ND-46
## 121 114     LOC1 1216  16      1   3      1    2    23     ND-23
## 122 121     LOC1 1215  16      2   3      2    2    21     ND-21
## 123 128     LOC1 1214  16      3   3      3    2    56     ND-56
## 124 135     LOC1 1213  16      4   3      4    2     4      ND-4
## 125 142     LOC1 1212  16      5   3      5    2    49     ND-49
## 126 149     LOC1 1211  16      6   3      6    2    42     ND-42
## 127 156     LOC1 1210  16      7   3      7    2     3      ND-3
## 128 163     LOC1 1209  16      8   3      8    2    13     ND-13
## 129 115     LOC1 1217  17      1   3      1    3    10     ND-10
## 130 122     LOC1 1218  17      2   3      2    3    16     ND-16
## 131 129     LOC1 1219  17      3   3      3    3    47     ND-47
## 132 136     LOC1 1220  17      4   3      4    3    31     ND-31
## 133 143     LOC1 1221  17      5   3      5    3     8      ND-8
## 134 150     LOC1 1222  17      6   3      6    3    33     ND-33
## 135 157     LOC1 1223  17      7   3      7    3    55     ND-55
## 136 164     LOC1 1224  17      8   3      8    3    24     ND-24
## 137 116     LOC1 1232  18      1   3      1    4    40     ND-40
## 138 123     LOC1 1231  18      2   3      2    4    34     ND-34
## 139 130     LOC1 1230  18      3   3      3    4    11     ND-11
## 140 137     LOC1 1229  18      4   3      4    4    35     ND-35
## 141 144     LOC1 1228  18      5   3      5    4    43     ND-43
## 142 151     LOC1 1227  18      6   3      6    4    12     ND-12
## 143 158     LOC1 1226  18      7   3      7    4    48     ND-48
## 144 165     LOC1 1225  18      8   3      8    4    52     ND-52
## 145 117     LOC1 1233  19      1   3      1    5    25     ND-25
## 146 124     LOC1 1234  19      2   3      2    5    51     ND-51
## 147 131     LOC1 1235  19      3   3      3    5     1      ND-1
## 148 138     LOC1 1236  19      4   3      4    5    50     ND-50
## 149 145     LOC1 1237  19      5   3      5    5    18     ND-18
## 150 152     LOC1 1238  19      6   3      6    5     6      ND-6
## 151 159     LOC1 1239  19      7   3      7    5    36     ND-36
## 152 166     LOC1 1240  19      8   3      8    5    39     ND-39
## 153 118     LOC1 1248  20      1   3      1    6    54     ND-54
## 154 125     LOC1 1247  20      2   3      2    6    28     ND-28
## 155 132     LOC1 1246  20      3   3      3    6    20     ND-20
## 156 139     LOC1 1245  20      4   3      4    6    45     ND-45
## 157 146     LOC1 1244  20      5   3      5    6    15     ND-15
## 158 153     LOC1 1243  20      6   3      6    6    32     ND-32
## 159 160     LOC1 1242  20      7   3      7    6    26     ND-26
## 160 167     LOC1 1241  20      8   3      8    6    27     ND-27
## 161 119     LOC1 1249  21      1   3      1    7     5      ND-5
## 162 126     LOC1 1250  21      2   3      2    7    41     ND-41
## 163 133     LOC1 1251  21      3   3      3    7    38     ND-38
## 164 140     LOC1 1252  21      4   3      4    7    17     ND-17
## 165 147     LOC1 1253  21      5   3      5    7    37     ND-37
## 166 154     LOC1 1254  21      6   3      6    7    53     ND-53
## 167 161     LOC1 1255  21      7   3      7    7     9      ND-9
## 168 168     LOC1 1256  21      8   3      8    7     2      ND-2
## 169 169     LOC1 1308  22      1   4      1    1    35     ND-35
## 170 176     LOC1 1307  22      2   4      2    1    50     ND-50
## 171 183     LOC1 1306  22      3   4      3    1    12     ND-12
## 172 190     LOC1 1305  22      4   4      4    1     4      ND-4
## 173 197     LOC1 1304  22      5   4      5    1    24     ND-24
## 174 204     LOC1 1303  22      6   4      6    1    18     ND-18
## 175 211     LOC1 1302  22      7   4      7    1    34     ND-34
## 176 218     LOC1 1301  22      8   4      8    1    55     ND-55
## 177 170     LOC1 1309  23      1   4      1    2     9      ND-9
## 178 177     LOC1 1310  23      2   4      2    2    15     ND-15
## 179 184     LOC1 1311  23      3   4      3    2    26     ND-26
## 180 191     LOC1 1312  23      4   4      4    2    39     ND-39
## 181 198     LOC1 1313  23      5   4      5    2    49     ND-49
## 182 205     LOC1 1314  23      6   4      6    2    48     ND-48
## 183 212     LOC1 1315  23      7   4      7    2    56     ND-56
## 184 219     LOC1 1316  23      8   4      8    2    19     ND-19
## 185 171     LOC1 1324  24      1   4      1    3    32     ND-32
## 186 178     LOC1 1323  24      2   4      2    3    20     ND-20
## 187 185     LOC1 1322  24      3   4      3    3    45     ND-45
## 188 192     LOC1 1321  24      4   4      4    3    22     ND-22
## 189 199     LOC1 1320  24      5   4      5    3    42     ND-42
## 190 206     LOC1 1319  24      6   4      6    3    11     ND-11
## 191 213     LOC1 1318  24      7   4      7    3    17     ND-17
## 192 220     LOC1 1317  24      8   4      8    3    10     ND-10
## 193 172     LOC1 1325  25      1   4      1    4    54     ND-54
## 194 179     LOC1 1326  25      2   4      2    4    40     ND-40
## 195 186     LOC1 1327  25      3   4      3    4    51     ND-51
## 196 193     LOC1 1328  25      4   4      4    4    25     ND-25
## 197 200     LOC1 1329  25      5   4      5    4     7      ND-7
## 198 207     LOC1 1330  25      6   4      6    4    33     ND-33
## 199 214     LOC1 1331  25      7   4      7    4    13     ND-13
## 200 221     LOC1 1332  25      8   4      8    4    46     ND-46
## 201 173     LOC1 1340  26      1   4      1    5     2      ND-2
## 202 180     LOC1 1339  26      2   4      2    5    27     ND-27
## 203 187     LOC1 1338  26      3   4      3    5     8      ND-8
## 204 194     LOC1 1337  26      4   4      4    5    43     ND-43
## 205 201     LOC1 1336  26      5   4      5    5    29     ND-29
## 206 208     LOC1 1335  26      6   4      6    5    52     ND-52
## 207 215     LOC1 1334  26      7   4      7    5    44     ND-44
## 208 222     LOC1 1333  26      8   4      8    5    28     ND-28
## 209 174     LOC1 1341  27      1   4      1    6    21     ND-21
## 210 181     LOC1 1342  27      2   4      2    6     6      ND-6
## 211 188     LOC1 1343  27      3   4      3    6    38     ND-38
## 212 195     LOC1 1344  27      4   4      4    6    53     ND-53
## 213 202     LOC1 1345  27      5   4      5    6    14     ND-14
## 214 209     LOC1 1346  27      6   4      6    6    31     ND-31
## 215 216     LOC1 1347  27      7   4      7    6     3      ND-3
## 216 223     LOC1 1348  27      8   4      8    6     1      ND-1
## 217 175     LOC1 1356  28      1   4      1    7    47     ND-47
## 218 182     LOC1 1355  28      2   4      2    7    41     ND-41
## 219 189     LOC1 1354  28      3   4      3    7    23     ND-23
## 220 196     LOC1 1353  28      4   4      4    7    16     ND-16
## 221 203     LOC1 1352  28      5   4      5    7    36     ND-36
## 222 210     LOC1 1351  28      6   4      6    7     5      ND-5
## 223 217     LOC1 1350  28      7   4      7    7    30     ND-30
## 224 224     LOC1 1349  28      8   4      8    7    37     ND-37
## 225 225     LOC1 1401  29      1   5      1    1    37     ND-37
## 226 232     LOC1 1402  29      2   5      2    1    23     ND-23
## 227 239     LOC1 1403  29      3   5      3    1    49     ND-49
## 228 246     LOC1 1404  29      4   5      4    1    38     ND-38
## 229 253     LOC1 1405  29      5   5      5    1     8      ND-8
## 230 260     LOC1 1406  29      6   5      6    1    13     ND-13
## 231 267     LOC1 1407  29      7   5      7    1    18     ND-18
## 232 274     LOC1 1408  29      8   5      8    1    34     ND-34
## 233 226     LOC1 1416  30      1   5      1    2    17     ND-17
## 234 233     LOC1 1415  30      2   5      2    2     2      ND-2
## 235 240     LOC1 1414  30      3   5      3    2     3      ND-3
## 236 247     LOC1 1413  30      4   5      4    2    24     ND-24
## 237 254     LOC1 1412  30      5   5      5    2    21     ND-21
## 238 261     LOC1 1411  30      6   5      6    2    51     ND-51
## 239 268     LOC1 1410  30      7   5      7    2    12     ND-12
## 240 275     LOC1 1409  30      8   5      8    2    29     ND-29
## 241 227     LOC1 1417  31      1   5      1    3    47     ND-47
## 242 234     LOC1 1418  31      2   5      2    3    53     ND-53
## 243 241     LOC1 1419  31      3   5      3    3    10     ND-10
## 244 248     LOC1 1420  31      4   5      4    3    43     ND-43
## 245 255     LOC1 1421  31      5   5      5    3    44     ND-44
## 246 262     LOC1 1422  31      6   5      6    3     1      ND-1
## 247 269     LOC1 1423  31      7   5      7    3    46     ND-46
## 248 276     LOC1 1424  31      8   5      8    3    19     ND-19
## 249 228     LOC1 1432  32      1   5      1    4    16     ND-16
## 250 235     LOC1 1431  32      2   5      2    4    36     ND-36
## 251 242     LOC1 1430  32      3   5      3    4    32     ND-32
## 252 249     LOC1 1429  32      4   5      4    4    50     ND-50
## 253 256     LOC1 1428  32      5   5      5    4    55     ND-55
## 254 263     LOC1 1427  32      6   5      6    4    31     ND-31
## 255 270     LOC1 1426  32      7   5      7    4    25     ND-25
## 256 277     LOC1 1425  32      8   5      8    4    15     ND-15
## 257 229     LOC1 1433  33      1   5      1    5     6      ND-6
## 258 236     LOC1 1434  33      2   5      2    5    41     ND-41
## 259 243     LOC1 1435  33      3   5      3    5    20     ND-20
## 260 250     LOC1 1436  33      4   5      4    5     5      ND-5
## 261 257     LOC1 1437  33      5   5      5    5    14     ND-14
## 262 264     LOC1 1438  33      6   5      6    5    42     ND-42
## 263 271     LOC1 1439  33      7   5      7    5    56     ND-56
## 264 278     LOC1 1440  33      8   5      8    5     4      ND-4
## 265 230     LOC1 1448  34      1   5      1    6    52     ND-52
## 266 237     LOC1 1447  34      2   5      2    6    11     ND-11
## 267 244     LOC1 1446  34      3   5      3    6    39     ND-39
## 268 251     LOC1 1445  34      4   5      4    6    28     ND-28
## 269 258     LOC1 1444  34      5   5      5    6    27     ND-27
## 270 265     LOC1 1443  34      6   5      6    6    22     ND-22
## 271 272     LOC1 1442  34      7   5      7    6    35     ND-35
## 272 279     LOC1 1441  34      8   5      8    6    48     ND-48
## 273 231     LOC1 1449  35      1   5      1    7    26     ND-26
## 274 238     LOC1 1450  35      2   5      2    7    30     ND-30
## 275 245     LOC1 1451  35      3   5      3    7    45     ND-45
## 276 252     LOC1 1452  35      4   5      4    7     9      ND-9
## 277 259     LOC1 1453  35      5   5      5    7    33     ND-33
## 278 266     LOC1 1454  35      6   5      6    7    40     ND-40
## 279 273     LOC1 1455  35      7   5      7    7     7      ND-7
## 280 280     LOC1 1456  35      8   5      8    7    54     ND-54
p

# Example 8: Strip Plot Design

example("strip_plot")
## 
## strp_p> # Example 1: Generates a strip plot design with 5 vertical strips and 4 horizontal strips,
## strp_p> # with 3 reps in one location.
## strp_p> H <- paste("H", 1:4, sep = "")
## 
## strp_p> V <- paste("V", 1:5, sep = "")
## 
## strp_p> strip1 <- strip_plot(Hplots = H, 
## strp_p+                      Vplots = V, 
## strp_p+                      b = 3, 
## strp_p+                      l = 1, 
## strp_p+                      plotNumber = 101,
## strp_p+                      planter = "serpentine",
## strp_p+                      locationNames = "A", 
## strp_p+                      seed = 333)
## 
## strp_p> strip1$infoDesign                  
## $Hplots
## [1] 4
## 
## $Vplots
## [1] 5
## 
## $blocks
## [1] 3
## 
## $numberLocations
## [1] 1
## 
## $nameLocations
## [1] "A"
## 
## $seed
## [1] 333
## 
## $id_design
## [1] 7
## 
## 
## strp_p> strip1$stripsBlockLoc
## $Loc_A
## $Loc_A$rep1
##    V4      V2      V5      V1      V3     
## H2 "H2|V4" "H2|V2" "H2|V5" "H2|V1" "H2|V3"
## H1 "H1|V4" "H1|V2" "H1|V5" "H1|V1" "H1|V3"
## H3 "H3|V4" "H3|V2" "H3|V5" "H3|V1" "H3|V3"
## H4 "H4|V4" "H4|V2" "H4|V5" "H4|V1" "H4|V3"
## 
## $Loc_A$rep2
##    V1      V3      V4      V2      V5     
## H3 "H3|V1" "H3|V3" "H3|V4" "H3|V2" "H3|V5"
## H4 "H4|V1" "H4|V3" "H4|V4" "H4|V2" "H4|V5"
## H2 "H2|V1" "H2|V3" "H2|V4" "H2|V2" "H2|V5"
## H1 "H1|V1" "H1|V3" "H1|V4" "H1|V2" "H1|V5"
## 
## $Loc_A$rep3
##    V3      V1      V2      V4      V5     
## H2 "H2|V3" "H2|V1" "H2|V2" "H2|V4" "H2|V5"
## H1 "H1|V3" "H1|V1" "H1|V2" "H1|V4" "H1|V5"
## H4 "H4|V3" "H4|V1" "H4|V2" "H4|V4" "H4|V5"
## H3 "H3|V3" "H3|V1" "H3|V2" "H3|V4" "H3|V5"
## 
## 
## 
## strp_p> strip1$plotLayouts
## $Loc_A
## $Loc_A$rep1
##      [,1] [,2] [,3] [,4] [,5]
## [1,]  101  102  103  104  105
## [2,]  110  109  108  107  106
## [3,]  111  112  113  114  115
## [4,]  120  119  118  117  116
## 
## $Loc_A$rep2
##      [,1] [,2] [,3] [,4] [,5]
## [1,]  201  202  203  204  205
## [2,]  210  209  208  207  206
## [3,]  211  212  213  214  215
## [4,]  220  219  218  217  216
## 
## $Loc_A$rep3
##      [,1] [,2] [,3] [,4] [,5]
## [1,]  301  302  303  304  305
## [2,]  310  309  308  307  306
## [3,]  311  312  313  314  315
## [4,]  320  319  318  317  316
## 
## 
## 
## strp_p> head(strip1$fieldBook,12)                     
##    ID LOCATION PLOT REP HSTRIP VSTRIP TRT_COMB
## 1   1        A  101   1     H2     V4    H2|V4
## 2   2        A  102   1     H2     V2    H2|V2
## 3   3        A  103   1     H2     V5    H2|V5
## 4   4        A  104   1     H2     V1    H2|V1
## 5   5        A  105   1     H2     V3    H2|V3
## 6   6        A  110   1     H1     V4    H1|V4
## 7   7        A  109   1     H1     V2    H1|V2
## 8   8        A  108   1     H1     V5    H1|V5
## 9   9        A  107   1     H1     V1    H1|V1
## 10 10        A  106   1     H1     V3    H1|V3
## 11 11        A  111   1     H3     V4    H3|V4
## 12 12        A  112   1     H3     V2    H3|V2
## 
## strp_p> # Example 2: Generates a strip plot design with 5 vertical strips and 5 horizontal strips,
## strp_p> # with 6 reps across to 3 locations. In this case, we show how to use the option data.
## strp_p> Hplots <- LETTERS[1:5]
## 
## strp_p> Vplots <- LETTERS[1:4]
## 
## strp_p> strip_data <- data.frame(list(HPLOTS = Hplots, VPLOTS = c(Vplots, NA)))
## 
## strp_p> head(strip_data)
##   HPLOTS VPLOTS
## 1      A      A
## 2      B      B
## 3      C      C
## 4      D      D
## 5      E   <NA>
## 
## strp_p> strip2 <- strip_plot(Hplots = 5, 
## strp_p+                      Vplots = 5, 
## strp_p+                      b = 6, 
## strp_p+                      l = 3, 
## strp_p+                      plotNumber = c(101,1001,2001),
## strp_p+                      planter = "cartesian",
## strp_p+                      locationNames = c("A", "B", "C"), 
## strp_p+                      seed = 222,
## strp_p+                      data = strip_data)
## 
## strp_p> strip2$infoDesign                  
## $Hplots
## [1] 5
## 
## $Vplots
## [1] 4
## 
## $blocks
## [1] 6
## 
## $numberLocations
## [1] 3
## 
## $nameLocations
## [1] "A" "B" "C"
## 
## $seed
## [1] 222
## 
## $id_design
## [1] 7
## 
## 
## strp_p> strip2$stripsBlockLoc
## $Loc_A
## $Loc_A$rep1
##   D     B     C     A    
## E "E|D" "E|B" "E|C" "E|A"
## B "B|D" "B|B" "B|C" "B|A"
## C "C|D" "C|B" "C|C" "C|A"
## D "D|D" "D|B" "D|C" "D|A"
## A "A|D" "A|B" "A|C" "A|A"
## 
## $Loc_A$rep2
##   D     B     C     A    
## A "A|D" "A|B" "A|C" "A|A"
## B "B|D" "B|B" "B|C" "B|A"
## E "E|D" "E|B" "E|C" "E|A"
## D "D|D" "D|B" "D|C" "D|A"
## C "C|D" "C|B" "C|C" "C|A"
## 
## $Loc_A$rep3
##   A     D     C     B    
## A "A|A" "A|D" "A|C" "A|B"
## D "D|A" "D|D" "D|C" "D|B"
## E "E|A" "E|D" "E|C" "E|B"
## B "B|A" "B|D" "B|C" "B|B"
## C "C|A" "C|D" "C|C" "C|B"
## 
## $Loc_A$rep4
##   A     B     C     D    
## A "A|A" "A|B" "A|C" "A|D"
## C "C|A" "C|B" "C|C" "C|D"
## E "E|A" "E|B" "E|C" "E|D"
## B "B|A" "B|B" "B|C" "B|D"
## D "D|A" "D|B" "D|C" "D|D"
## 
## $Loc_A$rep5
##   A     C     D     B    
## B "B|A" "B|C" "B|D" "B|B"
## C "C|A" "C|C" "C|D" "C|B"
## E "E|A" "E|C" "E|D" "E|B"
## A "A|A" "A|C" "A|D" "A|B"
## D "D|A" "D|C" "D|D" "D|B"
## 
## $Loc_A$rep6
##   B     C     D     A    
## D "D|B" "D|C" "D|D" "D|A"
## E "E|B" "E|C" "E|D" "E|A"
## B "B|B" "B|C" "B|D" "B|A"
## C "C|B" "C|C" "C|D" "C|A"
## A "A|B" "A|C" "A|D" "A|A"
## 
## 
## $Loc_B
## $Loc_B$rep1
##   B     C     D     A    
## B "B|B" "B|C" "B|D" "B|A"
## D "D|B" "D|C" "D|D" "D|A"
## E "E|B" "E|C" "E|D" "E|A"
## A "A|B" "A|C" "A|D" "A|A"
## C "C|B" "C|C" "C|D" "C|A"
## 
## $Loc_B$rep2
##   D     C     A     B    
## D "D|D" "D|C" "D|A" "D|B"
## A "A|D" "A|C" "A|A" "A|B"
## C "C|D" "C|C" "C|A" "C|B"
## E "E|D" "E|C" "E|A" "E|B"
## B "B|D" "B|C" "B|A" "B|B"
## 
## $Loc_B$rep3
##   D     A     C     B    
## B "B|D" "B|A" "B|C" "B|B"
## E "E|D" "E|A" "E|C" "E|B"
## C "C|D" "C|A" "C|C" "C|B"
## D "D|D" "D|A" "D|C" "D|B"
## A "A|D" "A|A" "A|C" "A|B"
## 
## $Loc_B$rep4
##   C     D     A     B    
## D "D|C" "D|D" "D|A" "D|B"
## C "C|C" "C|D" "C|A" "C|B"
## E "E|C" "E|D" "E|A" "E|B"
## A "A|C" "A|D" "A|A" "A|B"
## B "B|C" "B|D" "B|A" "B|B"
## 
## $Loc_B$rep5
##   A     B     D     C    
## D "D|A" "D|B" "D|D" "D|C"
## C "C|A" "C|B" "C|D" "C|C"
## A "A|A" "A|B" "A|D" "A|C"
## B "B|A" "B|B" "B|D" "B|C"
## E "E|A" "E|B" "E|D" "E|C"
## 
## $Loc_B$rep6
##   C     D     B     A    
## B "B|C" "B|D" "B|B" "B|A"
## D "D|C" "D|D" "D|B" "D|A"
## A "A|C" "A|D" "A|B" "A|A"
## C "C|C" "C|D" "C|B" "C|A"
## E "E|C" "E|D" "E|B" "E|A"
## 
## 
## $Loc_C
## $Loc_C$rep1
##   D     A     C     B    
## D "D|D" "D|A" "D|C" "D|B"
## B "B|D" "B|A" "B|C" "B|B"
## E "E|D" "E|A" "E|C" "E|B"
## A "A|D" "A|A" "A|C" "A|B"
## C "C|D" "C|A" "C|C" "C|B"
## 
## $Loc_C$rep2
##   B     C     A     D    
## B "B|B" "B|C" "B|A" "B|D"
## A "A|B" "A|C" "A|A" "A|D"
## D "D|B" "D|C" "D|A" "D|D"
## C "C|B" "C|C" "C|A" "C|D"
## E "E|B" "E|C" "E|A" "E|D"
## 
## $Loc_C$rep3
##   C     D     A     B    
## E "E|C" "E|D" "E|A" "E|B"
## C "C|C" "C|D" "C|A" "C|B"
## D "D|C" "D|D" "D|A" "D|B"
## A "A|C" "A|D" "A|A" "A|B"
## B "B|C" "B|D" "B|A" "B|B"
## 
## $Loc_C$rep4
##   C     D     B     A    
## D "D|C" "D|D" "D|B" "D|A"
## A "A|C" "A|D" "A|B" "A|A"
## B "B|C" "B|D" "B|B" "B|A"
## E "E|C" "E|D" "E|B" "E|A"
## C "C|C" "C|D" "C|B" "C|A"
## 
## $Loc_C$rep5
##   A     B     D     C    
## B "B|A" "B|B" "B|D" "B|C"
## D "D|A" "D|B" "D|D" "D|C"
## A "A|A" "A|B" "A|D" "A|C"
## E "E|A" "E|B" "E|D" "E|C"
## C "C|A" "C|B" "C|D" "C|C"
## 
## $Loc_C$rep6
##   C     D     A     B    
## B "B|C" "B|D" "B|A" "B|B"
## E "E|C" "E|D" "E|A" "E|B"
## A "A|C" "A|D" "A|A" "A|B"
## D "D|C" "D|D" "D|A" "D|B"
## C "C|C" "C|D" "C|A" "C|B"
## 
## 
## 
## strp_p> strip2$plotLayouts
## $Loc_A
## $Loc_A$rep1
##      [,1] [,2] [,3] [,4]
## [1,]  101  102  103  104
## [2,]  105  106  107  108
## [3,]  109  110  111  112
## [4,]  113  114  115  116
## [5,]  117  118  119  120
## 
## $Loc_A$rep2
##      [,1] [,2] [,3] [,4]
## [1,]  201  202  203  204
## [2,]  205  206  207  208
## [3,]  209  210  211  212
## [4,]  213  214  215  216
## [5,]  217  218  219  220
## 
## $Loc_A$rep3
##      [,1] [,2] [,3] [,4]
## [1,]  301  302  303  304
## [2,]  305  306  307  308
## [3,]  309  310  311  312
## [4,]  313  314  315  316
## [5,]  317  318  319  320
## 
## $Loc_A$rep4
##      [,1] [,2] [,3] [,4]
## [1,]  401  402  403  404
## [2,]  405  406  407  408
## [3,]  409  410  411  412
## [4,]  413  414  415  416
## [5,]  417  418  419  420
## 
## $Loc_A$rep5
##      [,1] [,2] [,3] [,4]
## [1,]  501  502  503  504
## [2,]  505  506  507  508
## [3,]  509  510  511  512
## [4,]  513  514  515  516
## [5,]  517  518  519  520
## 
## $Loc_A$rep6
##      [,1] [,2] [,3] [,4]
## [1,]  601  602  603  604
## [2,]  605  606  607  608
## [3,]  609  610  611  612
## [4,]  613  614  615  616
## [5,]  617  618  619  620
## 
## 
## $Loc_B
## $Loc_B$rep1
##      [,1] [,2] [,3] [,4]
## [1,] 1001 1002 1003 1004
## [2,] 1005 1006 1007 1008
## [3,] 1009 1010 1011 1012
## [4,] 1013 1014 1015 1016
## [5,] 1017 1018 1019 1020
## 
## $Loc_B$rep2
##      [,1] [,2] [,3] [,4]
## [1,] 1101 1102 1103 1104
## [2,] 1105 1106 1107 1108
## [3,] 1109 1110 1111 1112
## [4,] 1113 1114 1115 1116
## [5,] 1117 1118 1119 1120
## 
## $Loc_B$rep3
##      [,1] [,2] [,3] [,4]
## [1,] 1201 1202 1203 1204
## [2,] 1205 1206 1207 1208
## [3,] 1209 1210 1211 1212
## [4,] 1213 1214 1215 1216
## [5,] 1217 1218 1219 1220
## 
## $Loc_B$rep4
##      [,1] [,2] [,3] [,4]
## [1,] 1301 1302 1303 1304
## [2,] 1305 1306 1307 1308
## [3,] 1309 1310 1311 1312
## [4,] 1313 1314 1315 1316
## [5,] 1317 1318 1319 1320
## 
## $Loc_B$rep5
##      [,1] [,2] [,3] [,4]
## [1,] 1401 1402 1403 1404
## [2,] 1405 1406 1407 1408
## [3,] 1409 1410 1411 1412
## [4,] 1413 1414 1415 1416
## [5,] 1417 1418 1419 1420
## 
## $Loc_B$rep6
##      [,1] [,2] [,3] [,4]
## [1,] 1501 1502 1503 1504
## [2,] 1505 1506 1507 1508
## [3,] 1509 1510 1511 1512
## [4,] 1513 1514 1515 1516
## [5,] 1517 1518 1519 1520
## 
## 
## $Loc_C
## $Loc_C$rep1
##      [,1] [,2] [,3] [,4]
## [1,] 2001 2002 2003 2004
## [2,] 2005 2006 2007 2008
## [3,] 2009 2010 2011 2012
## [4,] 2013 2014 2015 2016
## [5,] 2017 2018 2019 2020
## 
## $Loc_C$rep2
##      [,1] [,2] [,3] [,4]
## [1,] 2101 2102 2103 2104
## [2,] 2105 2106 2107 2108
## [3,] 2109 2110 2111 2112
## [4,] 2113 2114 2115 2116
## [5,] 2117 2118 2119 2120
## 
## $Loc_C$rep3
##      [,1] [,2] [,3] [,4]
## [1,] 2201 2202 2203 2204
## [2,] 2205 2206 2207 2208
## [3,] 2209 2210 2211 2212
## [4,] 2213 2214 2215 2216
## [5,] 2217 2218 2219 2220
## 
## $Loc_C$rep4
##      [,1] [,2] [,3] [,4]
## [1,] 2301 2302 2303 2304
## [2,] 2305 2306 2307 2308
## [3,] 2309 2310 2311 2312
## [4,] 2313 2314 2315 2316
## [5,] 2317 2318 2319 2320
## 
## $Loc_C$rep5
##      [,1] [,2] [,3] [,4]
## [1,] 2401 2402 2403 2404
## [2,] 2405 2406 2407 2408
## [3,] 2409 2410 2411 2412
## [4,] 2413 2414 2415 2416
## [5,] 2417 2418 2419 2420
## 
## $Loc_C$rep6
##      [,1] [,2] [,3] [,4]
## [1,] 2501 2502 2503 2504
## [2,] 2505 2506 2507 2508
## [3,] 2509 2510 2511 2512
## [4,] 2513 2514 2515 2516
## [5,] 2517 2518 2519 2520
## 
## 
## 
## strp_p> head(strip2$fieldBook,12)
##    ID LOCATION PLOT REP HSTRIP VSTRIP TRT_COMB
## 1   1        A  101   1      E      D      E|D
## 2   2        A  102   1      E      B      E|B
## 3   3        A  103   1      E      C      E|C
## 4   4        A  104   1      E      A      E|A
## 5   5        A  105   1      B      D      B|D
## 6   6        A  106   1      B      B      B|B
## 7   7        A  107   1      B      C      B|C
## 8   8        A  108   1      B      A      B|A
## 9   9        A  109   1      C      D      C|D
## 10 10        A  110   1      C      B      C|B
## 11 11        A  111   1      C      C      C|C
## 12 12        A  112   1      C      A      C|A
plt <- plot(strip2)