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.
##
## 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
p <- full_control_positions(plt$field_book, "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT")
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")
p
# Example 3: Full Factorial Design
##
## 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
p <- full_control_positions(plt$field_book[plt$field_book$LOCATION == "Loc1",], "COLUMN", "ROW", factor_name = "FACTOR_A", label = "FACTOR_A")
p
# Example 4: Incomplete Blocks Design
##
## 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
p <- full_control_positions(plt$field_book, "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT")
p
# Example 5: Diagonal Arrangement Design
##
## 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 2025 101 1 1 0 55 Gen-55
## 2 2 20WRY1 MINOT 2025 102 1 2 0 108 Gen-108
## 3 3 20WRY1 MINOT 2025 103 1 3 0 248 Gen-248
## 4 4 20WRY1 MINOT 2025 104 1 4 4 4 Check-4
## 5 5 20WRY1 MINOT 2025 105 1 5 0 250 Gen-250
## 6 6 20WRY1 MINOT 2025 106 1 6 0 217 Gen-217
## 7 7 20WRY1 MINOT 2025 107 1 7 0 123 Gen-123
## 8 8 20WRY1 MINOT 2025 108 1 8 0 249 Gen-249
## 9 9 20WRY1 MINOT 2025 109 1 9 0 126 Gen-126
## 10 10 20WRY1 MINOT 2025 110 1 10 0 28 Gen-28
## 11 11 20WRY1 MINOT 2025 111 1 11 0 23 Gen-23
## 12 12 20WRY1 MINOT 2025 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 2025 1 1 1 2 2 CH2
## 2 2 Block1 1 2025 2 1 2 0 94 G94
## 3 3 Block1 1 2025 3 1 3 0 102 G102
## 4 4 Block1 1 2025 4 1 4 0 114 G114
## 5 5 Block1 1 2025 5 1 5 0 26 G26
## 6 6 Block1 1 2025 6 1 6 0 79 G79
## 7 7 Block1 1 2025 7 1 7 0 91 G91
## 8 8 Block1 1 2025 8 1 8 0 131 G131
## 9 9 Block1 1 2025 9 1 9 0 25 G25
## 10 10 Block1 1 2025 10 1 10 0 109 G109
## 11 11 Block1 1 2025 11 1 11 0 8 G8
## 12 12 Block1 1 2025 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 2025 1 1 1 0 79 Gen-79
## 2 2 20WRA 1 2025 2 1 2 0 62 Gen-62
## 3 3 20WRA 1 2025 3 1 3 0 78 Gen-78
## 4 4 20WRA 1 2025 4 1 4 0 22 Gen-22
## 5 5 20WRA 1 2025 5 1 5 0 87 Gen-87
## 6 6 20WRB 1 2025 1001 1 6 0 121 Gen-121
## 7 7 20WRB 1 2025 1002 1 7 0 124 Gen-124
## 8 8 20WRB 1 2025 1003 1 8 0 112 Gen-112
## 9 9 20WRB 1 2025 1004 1 9 1 1 Check-1
## 10 10 20WRB 1 2025 1005 1 10 0 128 Gen-128
## 11 11 20WRC 1 2025 2001 1 11 0 228 Gen-228
## 12 12 20WRC 1 2025 2002 1 12 0 261 Gen-261
p <- full_control_positions(plt$field_book, "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT")
p
# Example 6: Augmented Randomized Complete Block Design (ARCBD)
##
## 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 2025 1 1 1 0 1 49 G49
## 2 2 Expt1 FARGO 2025 2 1 2 0 1 14 G14
## 3 3 Expt1 FARGO 2025 3 1 3 0 1 27 G27
## 4 4 Expt1 FARGO 2025 4 1 4 1 1 3 CH3
## 5 5 Expt1 FARGO 2025 5 1 5 1 1 2 CH2
## 6 6 Expt1 FARGO 2025 6 1 6 0 1 45 G45
## 7 7 Expt1 FARGO 2025 7 1 7 0 1 6 G6
## 8 8 Expt1 FARGO 2025 8 1 8 0 1 35 G35
## 9 9 Expt1 FARGO 2025 9 1 9 0 1 52 G52
## 10 10 Expt1 FARGO 2025 10 1 10 0 1 44 G44
## 11 11 Expt1 FARGO 2025 11 1 11 0 1 51 G51
## 12 12 Expt1 FARGO 2025 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 2025 101 1 1 0 1 345 G345
## 2 2 Expt1 A 2025 102 1 2 0 1 130 G130
## 3 3 Expt1 A 2025 103 1 3 1 1 4 CH4
## 4 4 Expt1 A 2025 104 1 4 0 1 162 G162
## 5 5 Expt1 A 2025 105 1 5 1 1 1 CH1
## 6 6 Expt1 A 2025 106 1 6 0 1 123 G123
## 7 7 Expt1 A 2025 107 1 7 1 1 2 CH2
## 8 8 Expt1 A 2025 108 1 8 0 1 39 G39
## 9 9 Expt1 A 2025 109 1 9 0 1 9 G9
## 10 10 Expt1 A 2025 110 1 10 0 1 302 G302
## 11 11 Expt1 A 2025 111 1 11 0 1 210 G210
## 12 12 Expt1 A 2025 112 1 12 0 1 352 G352
p <- full_control_positions(plt$field_book[plt$field_book$LOCATION == "A",], "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT") + guides(fill = "none")
p
# Example 7: Rectangular Lattice Design
##
## 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
p <- full_control_positions(plt$field_book[plt$field_book$LOCATION == "LOC1",], "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT")
p
# Example 8: Strip Plot Design
##
## 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
p <- full_control_positions(plt$field_book[plt$field_book$LOCATION == "A",], "COLUMN", "ROW", factor_name = "TRT_COMB", label = "TRT_COMB")
p
# Example 9: Square Lattice Design
##
## sqr_lt> # Example 1: Generates a square lattice design with 5 full blocks, 8 units per IBlock,
## sqr_lt> # 8 IBlocks for a square number of treatmens of 64 in two locations.
## sqr_lt> squareLattice1 <- square_lattice(t = 64, k = 8, r = 5, l = 2,
## sqr_lt+ plotNumber = c(1001, 2001),
## sqr_lt+ locationNames = c("FARGO", "MINOT"),
## sqr_lt+ seed = 1986)
##
## sqr_lt> squareLattice1$infoDesign
## $Reps
## [1] 5
##
## $IBlocks
## [1] 8
##
## $NumberTreatments
## [1] 64
##
## $NumberLocations
## [1] 2
##
## $Locations
## [1] "FARGO" "MINOT"
##
## $seed
## [1] 1986
##
## $lambda
## [1] 0.5555556
##
## $id_design
## [1] 10
##
##
## sqr_lt> head(squareLattice1$fieldBook,12)
## ID LOCATION PLOT REP IBLOCK UNIT ENTRY TREATMENT
## 1 1 FARGO 1001 1 1 1 34 G-34
## 2 2 FARGO 1002 1 1 2 58 G-58
## 3 3 FARGO 1003 1 1 3 10 G-10
## 4 4 FARGO 1004 1 1 4 18 G-18
## 5 5 FARGO 1005 1 1 5 26 G-26
## 6 6 FARGO 1006 1 1 6 2 G-2
## 7 7 FARGO 1007 1 1 7 42 G-42
## 8 8 FARGO 1008 1 1 8 50 G-50
## 9 9 FARGO 1009 1 2 1 57 G-57
## 10 10 FARGO 1010 1 2 2 25 G-25
## 11 11 FARGO 1011 1 2 3 49 G-49
## 12 12 FARGO 1012 1 2 4 41 G-41
##
## sqr_lt> # Example 2: Generates a square lattice design with 3 full blocks, 7 units per IBlock,
## sqr_lt> # 7 IBlocks for a square number of treatmens of 49 in one location.
## sqr_lt> # In this case, we show how to use the option data.
## sqr_lt> treatments <- paste("G", 1:49, sep = "")
##
## sqr_lt> ENTRY <- 1:49
##
## sqr_lt> treatment_list <- data.frame(list(ENTRY = ENTRY, TREATMENT = treatments))
##
## sqr_lt> head(treatment_list)
## ENTRY TREATMENT
## 1 1 G1
## 2 2 G2
## 3 3 G3
## 4 4 G4
## 5 5 G5
## 6 6 G6
##
## sqr_lt> squareLattice2 <- square_lattice(t = 49, k = 7, r = 3, l = 1,
## sqr_lt+ plotNumber = 1001,
## sqr_lt+ locationNames = "CASSELTON",
## sqr_lt+ seed = 1986,
## sqr_lt+ data = treatment_list)
##
## sqr_lt> squareLattice2$infoDesign
## $Reps
## [1] 3
##
## $IBlocks
## [1] 7
##
## $NumberTreatments
## [1] 49
##
## $NumberLocations
## [1] 1
##
## $Locations
## [1] "CASSELTON"
##
## $seed
## [1] 1986
##
## $lambda
## [1] 0.375
##
## $id_design
## [1] 10
##
##
## sqr_lt> head(squareLattice2$fieldBook,12)
## ID LOCATION PLOT REP IBLOCK UNIT ENTRY TREATMENT
## 1 1 CASSELTON 1001 1 1 1 39 G39
## 2 2 CASSELTON 1002 1 1 2 26 G26
## 3 3 CASSELTON 1003 1 1 3 13 G13
## 4 4 CASSELTON 1004 1 1 4 49 G49
## 5 5 CASSELTON 1005 1 1 5 16 G16
## 6 6 CASSELTON 1006 1 1 6 3 G3
## 7 7 CASSELTON 1007 1 1 7 29 G29
## 8 8 CASSELTON 1008 1 2 1 14 G14
## 9 9 CASSELTON 1009 1 2 2 27 G27
## 10 10 CASSELTON 1010 1 2 3 4 G4
## 11 11 CASSELTON 1011 1 2 4 30 G30
## 12 12 CASSELTON 1012 1 2 5 40 G40
p <- full_control_positions(plt$field_book[plt$field_book$LOCATION == "CASSELTON",], "COLUMN", "ROW", factor_name = "TREATMENT", label = "TREATMENT")
p
# Example 10: Split Plot Design
##
## splt_p> # Example 1: Generates a split plot design SPD with 4 whole plots, 2 sub plots per whole plot,
## splt_p> # and 4 reps in an RCBD arrangement. This in for a single location.
## splt_p> SPDExample1 <- split_plot(wp = 4, sp = 2, reps = 5, l = 1,
## splt_p+ plotNumber = 101,
## splt_p+ seed = 14,
## splt_p+ type = 2,
## splt_p+ locationNames = "FARGO")
##
## splt_p> SPDExample1$infoDesign
## $WholePlots
## [1] 1 2 3 4
##
## $SubPlots
## [1] 1 2
##
## $locationNumber
## [1] 1
##
## $locationNames
## [1] "FARGO"
##
## $plotNumbers
## [1] 101
##
## $typeDesign
## [1] "RCBD"
##
## $seed
## [1] 14
##
## $id_design
## [1] 5
##
##
## splt_p> SPDExample1$layoutlocations
## [[1]]
## PLOT REP Whole-plot Sub-plot
## [1,] "101" "1" "1" "1 2"
## [2,] "102" "1" "4" "2 1"
## [3,] "103" "1" "3" "2 1"
## [4,] "104" "1" "2" "2 1"
## [5,] "201" "2" "3" "1 2"
## [6,] "202" "2" "2" "2 1"
## [7,] "203" "2" "4" "2 1"
## [8,] "204" "2" "1" "2 1"
## [9,] "301" "3" "4" "2 1"
## [10,] "302" "3" "2" "1 2"
## [11,] "303" "3" "1" "2 1"
## [12,] "304" "3" "3" "2 1"
## [13,] "401" "4" "1" "2 1"
## [14,] "402" "4" "3" "2 1"
## [15,] "403" "4" "2" "2 1"
## [16,] "404" "4" "4" "1 2"
## [17,] "501" "5" "3" "1 2"
## [18,] "502" "5" "1" "2 1"
## [19,] "503" "5" "2" "2 1"
## [20,] "504" "5" "4" "2 1"
##
##
## splt_p> head(SPDExample1$fieldBook,12)
## ID LOCATION PLOT REP WHOLE_PLOT SUB_PLOT TRT_COMB
## 1 1 FARGO 101 1 1 1 1|1
## 2 2 FARGO 101 1 1 2 1|2
## 3 3 FARGO 102 1 4 2 4|2
## 4 4 FARGO 102 1 4 1 4|1
## 5 5 FARGO 103 1 3 2 3|2
## 6 6 FARGO 103 1 3 1 3|1
## 7 7 FARGO 104 1 2 2 2|2
## 8 8 FARGO 104 1 2 1 2|1
## 9 9 FARGO 201 2 3 1 3|1
## 10 10 FARGO 201 2 3 2 3|2
## 11 11 FARGO 202 2 2 2 2|2
## 12 12 FARGO 202 2 2 1 2|1
##
## splt_p> # Example 2: Generates a split plot design SPD with 5 whole plots
## splt_p> # (4 types of fungicide + one control), 10 sub plots per whole plot (10 bean varieties),
## splt_p> # and 6 reps in an RCBD arrangement. This in 3 locations or sites.
## splt_p> # In this case, we show how to use the option data.
## splt_p> wp <- c("NFung", paste("Fung", 1:4, sep = "")) # Fungicides (5 Whole plots)
##
## splt_p> sp <- paste("Beans", 1:10, sep = "") # Beans varieties (10 sub plots)
##
## splt_p> split_plot_Data <- data.frame(list(WHOLPLOT = c(wp, rep(NA, 5)), SUBPLOT = sp))
##
## splt_p> head(split_plot_Data, 12)
## WHOLPLOT SUBPLOT
## 1 NFung Beans1
## 2 Fung1 Beans2
## 3 Fung2 Beans3
## 4 Fung3 Beans4
## 5 Fung4 Beans5
## 6 <NA> Beans6
## 7 <NA> Beans7
## 8 <NA> Beans8
## 9 <NA> Beans9
## 10 <NA> Beans10
##
## splt_p> SPDExample2 <- split_plot(reps = 6, l = 3,
## splt_p+ plotNumber = c(101, 1001, 2001),
## splt_p+ seed = 23,
## splt_p+ type = 2,
## splt_p+ locationNames = c("A", "B", "C"),
## splt_p+ data = split_plot_Data)
##
## splt_p> SPDExample2$infoDesign
## $WholePlots
## [1] "NFung" "Fung1" "Fung2" "Fung3" "Fung4"
##
## $SubPlots
## [1] "Beans1" "Beans2" "Beans3" "Beans4" "Beans5" "Beans6" "Beans7"
## [8] "Beans8" "Beans9" "Beans10"
##
## $locationNumber
## [1] 3
##
## $locationNames
## [1] "A" "B" "C"
##
## $plotNumbers
## [1] 101 1001 2001
##
## $typeDesign
## [1] "RCBD"
##
## $seed
## [1] 23
##
## $id_design
## [1] 5
##
##
## splt_p> SPDExample2$layoutlocations
## [[1]]
## PLOT REP Whole-plot
## [1,] "101" "1" "Fung4"
## [2,] "102" "1" "Fung3"
## [3,] "103" "1" "Fung2"
## [4,] "104" "1" "Fung1"
## [5,] "105" "1" "NFung"
## [6,] "201" "2" "Fung2"
## [7,] "202" "2" "Fung4"
## [8,] "203" "2" "NFung"
## [9,] "204" "2" "Fung1"
## [10,] "205" "2" "Fung3"
## [11,] "301" "3" "NFung"
## [12,] "302" "3" "Fung2"
## [13,] "303" "3" "Fung4"
## [14,] "304" "3" "Fung3"
## [15,] "305" "3" "Fung1"
## [16,] "401" "4" "Fung3"
## [17,] "402" "4" "Fung2"
## [18,] "403" "4" "Fung1"
## [19,] "404" "4" "Fung4"
## [20,] "405" "4" "NFung"
## [21,] "501" "5" "Fung4"
## [22,] "502" "5" "Fung1"
## [23,] "503" "5" "Fung3"
## [24,] "504" "5" "NFung"
## [25,] "505" "5" "Fung2"
## [26,] "601" "6" "Fung1"
## [27,] "602" "6" "Fung2"
## [28,] "603" "6" "Fung3"
## [29,] "604" "6" "Fung4"
## [30,] "605" "6" "NFung"
## Sub-plot
## [1,] "Beans5 Beans1 Beans2 Beans3 Beans10 Beans6 Beans7 Beans9 Beans4 Beans8"
## [2,] "Beans9 Beans10 Beans8 Beans5 Beans7 Beans4 Beans2 Beans6 Beans3 Beans1"
## [3,] "Beans7 Beans10 Beans6 Beans2 Beans8 Beans3 Beans1 Beans4 Beans9 Beans5"
## [4,] "Beans7 Beans9 Beans8 Beans2 Beans3 Beans1 Beans5 Beans4 Beans6 Beans10"
## [5,] "Beans9 Beans10 Beans4 Beans3 Beans6 Beans7 Beans1 Beans2 Beans8 Beans5"
## [6,] "Beans4 Beans3 Beans9 Beans10 Beans1 Beans8 Beans5 Beans7 Beans6 Beans2"
## [7,] "Beans8 Beans7 Beans1 Beans5 Beans2 Beans10 Beans9 Beans6 Beans4 Beans3"
## [8,] "Beans8 Beans4 Beans1 Beans2 Beans9 Beans6 Beans3 Beans5 Beans10 Beans7"
## [9,] "Beans1 Beans7 Beans5 Beans4 Beans6 Beans9 Beans2 Beans8 Beans10 Beans3"
## [10,] "Beans6 Beans1 Beans4 Beans2 Beans7 Beans10 Beans3 Beans8 Beans9 Beans5"
## [11,] "Beans5 Beans3 Beans6 Beans9 Beans4 Beans1 Beans10 Beans7 Beans2 Beans8"
## [12,] "Beans3 Beans7 Beans4 Beans2 Beans8 Beans6 Beans5 Beans9 Beans10 Beans1"
## [13,] "Beans1 Beans6 Beans7 Beans9 Beans3 Beans2 Beans4 Beans5 Beans8 Beans10"
## [14,] "Beans8 Beans4 Beans2 Beans6 Beans10 Beans3 Beans5 Beans1 Beans9 Beans7"
## [15,] "Beans3 Beans8 Beans5 Beans1 Beans7 Beans10 Beans6 Beans2 Beans9 Beans4"
## [16,] "Beans4 Beans7 Beans5 Beans8 Beans9 Beans2 Beans10 Beans6 Beans1 Beans3"
## [17,] "Beans8 Beans9 Beans2 Beans1 Beans7 Beans6 Beans5 Beans10 Beans4 Beans3"
## [18,] "Beans9 Beans8 Beans2 Beans5 Beans1 Beans6 Beans10 Beans7 Beans4 Beans3"
## [19,] "Beans10 Beans3 Beans6 Beans1 Beans5 Beans8 Beans7 Beans2 Beans4 Beans9"
## [20,] "Beans6 Beans8 Beans10 Beans1 Beans7 Beans3 Beans5 Beans4 Beans2 Beans9"
## [21,] "Beans8 Beans7 Beans9 Beans6 Beans1 Beans5 Beans2 Beans3 Beans10 Beans4"
## [22,] "Beans3 Beans9 Beans8 Beans4 Beans1 Beans7 Beans10 Beans6 Beans2 Beans5"
## [23,] "Beans2 Beans5 Beans10 Beans1 Beans7 Beans6 Beans9 Beans4 Beans8 Beans3"
## [24,] "Beans8 Beans5 Beans7 Beans1 Beans9 Beans6 Beans2 Beans4 Beans3 Beans10"
## [25,] "Beans7 Beans8 Beans10 Beans4 Beans1 Beans9 Beans3 Beans2 Beans5 Beans6"
## [26,] "Beans3 Beans8 Beans4 Beans9 Beans2 Beans6 Beans1 Beans7 Beans10 Beans5"
## [27,] "Beans4 Beans10 Beans1 Beans8 Beans3 Beans9 Beans7 Beans5 Beans6 Beans2"
## [28,] "Beans5 Beans3 Beans6 Beans4 Beans2 Beans10 Beans8 Beans1 Beans9 Beans7"
## [29,] "Beans3 Beans7 Beans2 Beans5 Beans1 Beans9 Beans4 Beans10 Beans8 Beans6"
## [30,] "Beans8 Beans6 Beans2 Beans5 Beans9 Beans10 Beans1 Beans3 Beans4 Beans7"
##
## [[2]]
## PLOT REP Whole-plot
## [1,] "1001" "1" "Fung1"
## [2,] "1002" "1" "Fung3"
## [3,] "1003" "1" "NFung"
## [4,] "1004" "1" "Fung2"
## [5,] "1005" "1" "Fung4"
## [6,] "1101" "2" "Fung3"
## [7,] "1102" "2" "Fung2"
## [8,] "1103" "2" "Fung4"
## [9,] "1104" "2" "Fung1"
## [10,] "1105" "2" "NFung"
## [11,] "1201" "3" "NFung"
## [12,] "1202" "3" "Fung2"
## [13,] "1203" "3" "Fung1"
## [14,] "1204" "3" "Fung4"
## [15,] "1205" "3" "Fung3"
## [16,] "1301" "4" "Fung3"
## [17,] "1302" "4" "NFung"
## [18,] "1303" "4" "Fung2"
## [19,] "1304" "4" "Fung4"
## [20,] "1305" "4" "Fung1"
## [21,] "1401" "5" "Fung2"
## [22,] "1402" "5" "NFung"
## [23,] "1403" "5" "Fung1"
## [24,] "1404" "5" "Fung4"
## [25,] "1405" "5" "Fung3"
## [26,] "1501" "6" "Fung2"
## [27,] "1502" "6" "Fung1"
## [28,] "1503" "6" "NFung"
## [29,] "1504" "6" "Fung4"
## [30,] "1505" "6" "Fung3"
## Sub-plot
## [1,] "Beans3 Beans6 Beans8 Beans9 Beans4 Beans5 Beans7 Beans2 Beans1 Beans10"
## [2,] "Beans2 Beans4 Beans9 Beans10 Beans8 Beans3 Beans5 Beans6 Beans1 Beans7"
## [3,] "Beans3 Beans7 Beans1 Beans6 Beans5 Beans2 Beans4 Beans10 Beans8 Beans9"
## [4,] "Beans3 Beans5 Beans7 Beans6 Beans4 Beans10 Beans2 Beans9 Beans8 Beans1"
## [5,] "Beans4 Beans9 Beans8 Beans3 Beans6 Beans7 Beans5 Beans1 Beans2 Beans10"
## [6,] "Beans6 Beans3 Beans5 Beans2 Beans7 Beans10 Beans9 Beans1 Beans8 Beans4"
## [7,] "Beans8 Beans5 Beans6 Beans7 Beans10 Beans2 Beans3 Beans9 Beans4 Beans1"
## [8,] "Beans3 Beans1 Beans10 Beans4 Beans7 Beans9 Beans5 Beans2 Beans8 Beans6"
## [9,] "Beans7 Beans3 Beans9 Beans10 Beans1 Beans5 Beans6 Beans4 Beans8 Beans2"
## [10,] "Beans10 Beans1 Beans5 Beans9 Beans6 Beans3 Beans8 Beans7 Beans4 Beans2"
## [11,] "Beans6 Beans7 Beans8 Beans3 Beans5 Beans4 Beans2 Beans1 Beans9 Beans10"
## [12,] "Beans3 Beans9 Beans8 Beans5 Beans2 Beans1 Beans4 Beans6 Beans10 Beans7"
## [13,] "Beans2 Beans5 Beans9 Beans1 Beans8 Beans3 Beans4 Beans6 Beans10 Beans7"
## [14,] "Beans10 Beans7 Beans9 Beans8 Beans5 Beans1 Beans4 Beans3 Beans2 Beans6"
## [15,] "Beans1 Beans8 Beans2 Beans3 Beans7 Beans6 Beans5 Beans10 Beans4 Beans9"
## [16,] "Beans1 Beans4 Beans3 Beans9 Beans10 Beans5 Beans6 Beans7 Beans2 Beans8"
## [17,] "Beans1 Beans8 Beans6 Beans9 Beans7 Beans2 Beans3 Beans5 Beans10 Beans4"
## [18,] "Beans2 Beans3 Beans1 Beans8 Beans7 Beans6 Beans4 Beans9 Beans5 Beans10"
## [19,] "Beans9 Beans1 Beans10 Beans8 Beans7 Beans3 Beans5 Beans6 Beans4 Beans2"
## [20,] "Beans2 Beans1 Beans3 Beans7 Beans4 Beans10 Beans8 Beans6 Beans9 Beans5"
## [21,] "Beans10 Beans9 Beans6 Beans7 Beans4 Beans3 Beans5 Beans8 Beans1 Beans2"
## [22,] "Beans3 Beans10 Beans4 Beans7 Beans1 Beans8 Beans2 Beans9 Beans5 Beans6"
## [23,] "Beans8 Beans7 Beans2 Beans3 Beans10 Beans6 Beans5 Beans4 Beans1 Beans9"
## [24,] "Beans3 Beans10 Beans5 Beans8 Beans9 Beans4 Beans2 Beans1 Beans7 Beans6"
## [25,] "Beans2 Beans8 Beans4 Beans1 Beans5 Beans6 Beans7 Beans10 Beans3 Beans9"
## [26,] "Beans10 Beans1 Beans6 Beans2 Beans9 Beans8 Beans3 Beans5 Beans7 Beans4"
## [27,] "Beans4 Beans8 Beans7 Beans5 Beans10 Beans9 Beans2 Beans3 Beans1 Beans6"
## [28,] "Beans7 Beans9 Beans6 Beans5 Beans1 Beans8 Beans3 Beans10 Beans4 Beans2"
## [29,] "Beans3 Beans9 Beans8 Beans1 Beans7 Beans10 Beans6 Beans2 Beans4 Beans5"
## [30,] "Beans3 Beans2 Beans1 Beans8 Beans9 Beans6 Beans4 Beans7 Beans10 Beans5"
##
## [[3]]
## PLOT REP Whole-plot
## [1,] "2001" "1" "NFung"
## [2,] "2002" "1" "Fung2"
## [3,] "2003" "1" "Fung1"
## [4,] "2004" "1" "Fung4"
## [5,] "2005" "1" "Fung3"
## [6,] "2101" "2" "Fung1"
## [7,] "2102" "2" "Fung2"
## [8,] "2103" "2" "Fung4"
## [9,] "2104" "2" "NFung"
## [10,] "2105" "2" "Fung3"
## [11,] "2201" "3" "Fung3"
## [12,] "2202" "3" "NFung"
## [13,] "2203" "3" "Fung4"
## [14,] "2204" "3" "Fung2"
## [15,] "2205" "3" "Fung1"
## [16,] "2301" "4" "Fung3"
## [17,] "2302" "4" "Fung4"
## [18,] "2303" "4" "Fung1"
## [19,] "2304" "4" "Fung2"
## [20,] "2305" "4" "NFung"
## [21,] "2401" "5" "Fung3"
## [22,] "2402" "5" "Fung2"
## [23,] "2403" "5" "Fung1"
## [24,] "2404" "5" "Fung4"
## [25,] "2405" "5" "NFung"
## [26,] "2501" "6" "Fung1"
## [27,] "2502" "6" "Fung3"
## [28,] "2503" "6" "Fung2"
## [29,] "2504" "6" "Fung4"
## [30,] "2505" "6" "NFung"
## Sub-plot
## [1,] "Beans3 Beans2 Beans6 Beans4 Beans5 Beans10 Beans7 Beans1 Beans8 Beans9"
## [2,] "Beans5 Beans4 Beans9 Beans1 Beans6 Beans2 Beans10 Beans7 Beans8 Beans3"
## [3,] "Beans4 Beans7 Beans6 Beans1 Beans2 Beans10 Beans9 Beans3 Beans8 Beans5"
## [4,] "Beans9 Beans8 Beans3 Beans6 Beans1 Beans7 Beans10 Beans5 Beans2 Beans4"
## [5,] "Beans7 Beans10 Beans4 Beans8 Beans2 Beans5 Beans9 Beans1 Beans3 Beans6"
## [6,] "Beans8 Beans1 Beans3 Beans10 Beans6 Beans4 Beans9 Beans5 Beans7 Beans2"
## [7,] "Beans3 Beans6 Beans1 Beans5 Beans7 Beans10 Beans9 Beans4 Beans8 Beans2"
## [8,] "Beans4 Beans2 Beans7 Beans1 Beans10 Beans9 Beans6 Beans5 Beans3 Beans8"
## [9,] "Beans2 Beans7 Beans9 Beans3 Beans4 Beans1 Beans5 Beans6 Beans8 Beans10"
## [10,] "Beans9 Beans2 Beans4 Beans5 Beans6 Beans3 Beans1 Beans8 Beans10 Beans7"
## [11,] "Beans6 Beans10 Beans1 Beans7 Beans2 Beans9 Beans4 Beans5 Beans8 Beans3"
## [12,] "Beans5 Beans3 Beans10 Beans9 Beans4 Beans2 Beans7 Beans6 Beans1 Beans8"
## [13,] "Beans1 Beans2 Beans7 Beans8 Beans5 Beans3 Beans10 Beans6 Beans9 Beans4"
## [14,] "Beans5 Beans8 Beans1 Beans3 Beans10 Beans6 Beans2 Beans9 Beans4 Beans7"
## [15,] "Beans5 Beans8 Beans3 Beans4 Beans9 Beans1 Beans10 Beans7 Beans2 Beans6"
## [16,] "Beans9 Beans5 Beans8 Beans1 Beans3 Beans7 Beans2 Beans6 Beans10 Beans4"
## [17,] "Beans2 Beans5 Beans3 Beans9 Beans6 Beans7 Beans1 Beans4 Beans8 Beans10"
## [18,] "Beans3 Beans10 Beans1 Beans8 Beans2 Beans6 Beans9 Beans4 Beans5 Beans7"
## [19,] "Beans9 Beans10 Beans1 Beans7 Beans3 Beans6 Beans5 Beans4 Beans2 Beans8"
## [20,] "Beans9 Beans1 Beans4 Beans3 Beans6 Beans2 Beans5 Beans10 Beans8 Beans7"
## [21,] "Beans1 Beans9 Beans4 Beans8 Beans2 Beans5 Beans7 Beans6 Beans3 Beans10"
## [22,] "Beans4 Beans5 Beans10 Beans7 Beans6 Beans1 Beans2 Beans9 Beans8 Beans3"
## [23,] "Beans6 Beans3 Beans10 Beans8 Beans1 Beans9 Beans2 Beans4 Beans5 Beans7"
## [24,] "Beans6 Beans7 Beans8 Beans4 Beans3 Beans1 Beans9 Beans2 Beans5 Beans10"
## [25,] "Beans3 Beans9 Beans8 Beans7 Beans1 Beans5 Beans10 Beans2 Beans4 Beans6"
## [26,] "Beans8 Beans5 Beans7 Beans10 Beans1 Beans3 Beans2 Beans6 Beans4 Beans9"
## [27,] "Beans9 Beans4 Beans10 Beans7 Beans1 Beans6 Beans8 Beans5 Beans3 Beans2"
## [28,] "Beans7 Beans8 Beans1 Beans10 Beans3 Beans4 Beans2 Beans6 Beans9 Beans5"
## [29,] "Beans3 Beans5 Beans4 Beans2 Beans7 Beans10 Beans9 Beans8 Beans1 Beans6"
## [30,] "Beans3 Beans6 Beans2 Beans9 Beans1 Beans4 Beans8 Beans7 Beans5 Beans10"
##
##
## splt_p> head(SPDExample2$fieldBook,12)
## ID LOCATION PLOT REP WHOLE_PLOT SUB_PLOT TRT_COMB
## 1 1 A 101 1 Fung4 Beans5 Fung4|Beans5
## 2 2 A 101 1 Fung4 Beans1 Fung4|Beans1
## 3 3 A 101 1 Fung4 Beans2 Fung4|Beans2
## 4 4 A 101 1 Fung4 Beans3 Fung4|Beans3
## 5 5 A 101 1 Fung4 Beans10 Fung4|Beans10
## 6 6 A 101 1 Fung4 Beans6 Fung4|Beans6
## 7 7 A 101 1 Fung4 Beans7 Fung4|Beans7
## 8 8 A 101 1 Fung4 Beans9 Fung4|Beans9
## 9 9 A 101 1 Fung4 Beans4 Fung4|Beans4
## 10 10 A 101 1 Fung4 Beans8 Fung4|Beans8
## 11 11 A 102 1 Fung3 Beans9 Fung3|Beans9
## 12 12 A 102 1 Fung3 Beans10 Fung3|Beans10
p <- full_control_positions(plt$field_book[plt$field_book$LOCATION == "A",], "COLUMN", "ROW", factor_name = "TRT_COMB", label = "TRT_COMB")
p
# Example 11: Split-Split Plot Design
##
## splt__> # Example 1: Generates a split split plot design SSPD with 5 whole plots, 2 sub-plots,
## splt__> # 3 sub-sub plots, and 3 reps in an RCBD arrangement. This is for one location.
## splt__> SSPD1 <- split_split_plot(wp = 4, sp = 2, ssp = 3, reps = 5, l = 1,
## splt__+ plotNumber = 101,
## splt__+ seed = 23,
## splt__+ type = 2,
## splt__+ locationNames = "FARGO")
##
## splt__> SSPD1$infoDesign
## $Whole.Plots
## [1] 1 2 3 4
##
## $Sub.Plots
## [1] 1 2
##
## $Sub.Sub.Plots
## [1] 1 2 3
##
## $Locations
## [1] 1
##
## $typeDesign
## [1] "RCBD"
##
## $seed
## [1] 23
##
## $id_design
## [1] 6
##
##
## splt__> head(SSPD1$fieldBook,12)
## ID LOCATION PLOT REP WHOLE_PLOT SUB_PLOT SUB_SUB_PLOT TRT_COMB
## 1 1 FARGO 101 1 1 2 2 1|2|2
## 2 2 FARGO 101 1 1 2 1 1|2|1
## 3 3 FARGO 101 1 1 2 3 1|2|3
## 4 4 FARGO 101 1 1 1 2 1|1|2
## 5 5 FARGO 101 1 1 1 1 1|1|1
## 6 6 FARGO 101 1 1 1 3 1|1|3
## 7 7 FARGO 102 1 3 1 2 3|1|2
## 8 8 FARGO 102 1 3 1 1 3|1|1
## 9 9 FARGO 102 1 3 1 3 3|1|3
## 10 10 FARGO 102 1 3 2 2 3|2|2
## 11 11 FARGO 102 1 3 2 1 3|2|1
## 12 12 FARGO 102 1 3 2 3 3|2|3
##
## splt__> # Example 2: Generates a split split plot design SSPD with 2 whole plost
## splt__> # (Irrigation, No irrigation), 5 sub plots (4 types of fungicide + one control), and
## splt__> # 10 sub-sub plots (Ten varieties of beans), and 4 reps in an RCBD arrangement.
## splt__> # This is for 3 locations. In this case, we show how to use the option data.
## splt__> wp <- paste("IRR_", c("NO", "Yes"), sep = "") #Irrigation (2 Whole plots)
##
## splt__> sp <- c("NFung", paste("Fung", 1:4, sep = "")) #Fungicides (5 Sub plots)
##
## splt__> ssp <- paste("Beans", 1:10, sep = "") #Beans varieties (10 Sub-sub plots)
##
## splt__> split_split_plot_Data <- data.frame(list(WHOLPLOT = c(wp, rep(NA, 8)),
## splt__+ SUBPLOT = c(sp, rep(NA, 5)),
## splt__+ SUB_SUBPLOTS = ssp))
##
## splt__> head(split_split_plot_Data, 10)
## WHOLPLOT SUBPLOT SUB_SUBPLOTS
## 1 IRR_NO NFung Beans1
## 2 IRR_Yes Fung1 Beans2
## 3 <NA> Fung2 Beans3
## 4 <NA> Fung3 Beans4
## 5 <NA> Fung4 Beans5
## 6 <NA> <NA> Beans6
## 7 <NA> <NA> Beans7
## 8 <NA> <NA> Beans8
## 9 <NA> <NA> Beans9
## 10 <NA> <NA> Beans10
##
## splt__> SSPD2 <- split_split_plot(reps = 4, l = 3,
## splt__+ plotNumber = c(101, 1001, 2001),
## splt__+ seed = 23,
## splt__+ type = 2,
## splt__+ locationNames = c("A", "B", "C"),
## splt__+ data = split_split_plot_Data)
##
## splt__> SSPD2$infoDesign
## $Whole.Plots
## [1] "IRR_NO" "IRR_Yes"
##
## $Sub.Plots
## [1] "NFung" "Fung1" "Fung2" "Fung3" "Fung4"
##
## $Sub.Sub.Plots
## [1] "Beans1" "Beans2" "Beans3" "Beans4" "Beans5" "Beans6" "Beans7"
## [8] "Beans8" "Beans9" "Beans10"
##
## $Locations
## [1] 3
##
## $typeDesign
## [1] "RCBD"
##
## $seed
## [1] 23
##
## $id_design
## [1] 6
##
##
## splt__> head(SSPD2$fieldBook,12)
## ID LOCATION PLOT REP WHOLE_PLOT SUB_PLOT SUB_SUB_PLOT TRT_COMB
## 1 1 A 101 1 IRR_NO Fung3 Beans3 IRR_NO|Fung3|Beans3
## 2 2 A 101 1 IRR_NO Fung3 Beans9 IRR_NO|Fung3|Beans9
## 3 3 A 101 1 IRR_NO Fung3 Beans10 IRR_NO|Fung3|Beans10
## 4 4 A 101 1 IRR_NO Fung3 Beans7 IRR_NO|Fung3|Beans7
## 5 5 A 101 1 IRR_NO Fung3 Beans8 IRR_NO|Fung3|Beans8
## 6 6 A 101 1 IRR_NO Fung3 Beans5 IRR_NO|Fung3|Beans5
## 7 7 A 101 1 IRR_NO Fung3 Beans2 IRR_NO|Fung3|Beans2
## 8 8 A 101 1 IRR_NO Fung3 Beans6 IRR_NO|Fung3|Beans6
## 9 9 A 101 1 IRR_NO Fung3 Beans4 IRR_NO|Fung3|Beans4
## 10 10 A 101 1 IRR_NO Fung3 Beans1 IRR_NO|Fung3|Beans1
## 11 11 A 101 1 IRR_NO Fung1 Beans9 IRR_NO|Fung1|Beans9
## 12 12 A 101 1 IRR_NO Fung1 Beans2 IRR_NO|Fung1|Beans2
p <- full_control_positions(plt$field_book[plt$field_book$LOCATION == "A",], "COLUMN", "ROW", factor_name = "TRT_COMB", label = "TRT_COMB") + guides(fill = "none")
p
# Example 12: Completely Randomized Design (CRD)
##
## CRD> # Example 1: Generates a CRD design with 10 treatments and 5 reps each.
## CRD> crd1 <- CRD(
## CRD+ t = 10,
## CRD+ reps = 5,
## CRD+ plotNumber = 101,
## CRD+ seed = 1987,
## CRD+ locationName = "Fargo"
## CRD+ )
##
## CRD> crd1$infoDesign
## $numberofTreatments
## [1] 10
##
## $treatments
## [1] "T1" "T2" "T3" "T4" "T5" "T6" "T7" "T8" "T9" "T10"
##
## $Reps
## [1] 5
##
## $locationName
## [1] "Fargo"
##
## $seed
## [1] 1987
##
## $id_design
## [1] 1
##
##
## CRD> head(crd1$fieldBook, 10)
## ID LOCATION PLOT REP TREATMENT
## 1 1 Fargo 101 1 T10
## 2 2 Fargo 102 4 T1
## 3 3 Fargo 103 3 T3
## 4 4 Fargo 104 3 T9
## 5 5 Fargo 105 4 T3
## 6 6 Fargo 106 5 T3
## 7 7 Fargo 107 1 T2
## 8 8 Fargo 108 3 T4
## 9 9 Fargo 109 1 T1
## 10 10 Fargo 110 3 T1
##
## CRD> # Example 2: Generates a CRD design with 15 treatments and 6 reps each.
## CRD> Gens <- paste("Wheat", 1:15, sep = "")
##
## CRD> crd2 <- CRD(
## CRD+ t = Gens,
## CRD+ reps = 6,
## CRD+ plotNumber = 1001,
## CRD+ seed = 1654,
## CRD+ locationName = "Fargo"
## CRD+ )
##
## CRD> crd2$infoDesign
## $numberofTreatments
## [1] 15
##
## $treatments
## [1] "Wheat1" "Wheat2" "Wheat3" "Wheat4" "Wheat5" "Wheat6" "Wheat7"
## [8] "Wheat8" "Wheat9" "Wheat10" "Wheat11" "Wheat12" "Wheat13" "Wheat14"
## [15] "Wheat15"
##
## $Reps
## [1] 6
##
## $locationName
## [1] "Fargo"
##
## $seed
## [1] 1654
##
## $id_design
## [1] 1
##
##
## CRD> head(crd2$fieldBook, 10)
## ID LOCATION PLOT REP TREATMENT
## 1 1 Fargo 1001 6 Wheat3
## 2 2 Fargo 1002 2 Wheat8
## 3 3 Fargo 1003 2 Wheat2
## 4 4 Fargo 1004 4 Wheat4
## 5 5 Fargo 1005 1 Wheat1
## 6 6 Fargo 1006 1 Wheat4
## 7 7 Fargo 1007 1 Wheat13
## 8 8 Fargo 1008 1 Wheat1
## 9 9 Fargo 1009 6 Wheat15
## 10 10 Fargo 1010 4 Wheat7
##
## CRD> # Example 3: Generates a CRD design with 12 treatments and 4 reps each.
## CRD> # In this case, we show how to use the option data.
## CRD> treatments <- paste("ND-", 1:12, sep = "")
##
## CRD> treatment_list <- data.frame(list(TREATMENT = treatments, REP = 4))
##
## CRD> head(treatment_list)
## TREATMENT REP
## 1 ND-1 4
## 2 ND-2 4
## 3 ND-3 4
## 4 ND-4 4
## 5 ND-5 4
## 6 ND-6 4
##
## CRD> crd3 <- CRD(
## CRD+ t = NULL,
## CRD+ reps = NULL,
## CRD+ plotNumber = 2001,
## CRD+ seed = 1655,
## CRD+ locationName = "Cali",
## CRD+ data = treatment_list
## CRD+ )
##
## CRD> crd3$infoDesign
## $numberofTreatments
## [1] 12
##
## $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"
##
## $Reps
## [1] 4 4 4 4 4 4 4 4 4 4 4 4
##
## $locationName
## [1] "Cali"
##
## $seed
## [1] 1655
##
## $id_design
## [1] 1
##
##
## CRD> head(crd3$fieldBook, 10)
## ID LOCATION PLOT REP TREATMENT
## 1 1 Cali 2001 4 ND-3
## 2 2 Cali 2002 1 ND-7
## 3 3 Cali 2003 2 ND-2
## 4 4 Cali 2004 3 ND-8
## 5 5 Cali 2005 3 ND-2
## 6 6 Cali 2006 1 ND-10
## 7 7 Cali 2007 3 ND-7
## 8 8 Cali 2008 4 ND-9
## 9 9 Cali 2009 3 ND-4
## 10 10 Cali 2010 1 ND-3
##
## sprs_l> sparse <- sparse_allocation(
## sprs_l+ lines = 120,
## sprs_l+ l = 4,
## sprs_l+ copies_per_entry = 3,
## sprs_l+ checks = 4,
## sprs_l+ locationNames = c("LOC1", "LOC2", "LOC3", "LOC4", "LOC5"),
## sprs_l+ seed = 1234
## sprs_l+ )
##
## rw_clm> # Example 1: Generates a row-column design with 3 full blocks and 36 treatments
## rw_clm> # and 6 rows. This for one location.
## rw_clm> rowcold1 <- row_column(t = 36, nrows = 6, r = 3, l = 1,
## rw_clm+ plotNumber= 101,
## rw_clm+ locationNames = "Loc1",
## rw_clm+ seed = 21)
##
## rw_clm> rowcold1$infoDesign
## $rows
## [1] 6
##
## $columns
## [1] 6
##
## $reps
## [1] 3
##
## $treatments
## [1] 36
##
## $locations
## [1] 1
##
## $location_names
## [1] "Loc1"
##
## $seed
## [1] 21
##
## $id_design
## [1] 9
##
##
## rw_clm> rowcold1$resolvableBlocks
## $Loc_Loc1
## $Loc_Loc1$rep1
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 18 34 9 13 28 11
## [2,] 17 15 29 21 30 1
## [3,] 32 33 24 3 10 23
## [4,] 4 20 36 22 19 27
## [5,] 14 6 12 35 16 2
## [6,] 8 26 25 5 7 31
##
## $Loc_Loc1$rep2
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 10 31 28 4 9 33
## [2,] 1 35 20 29 7 3
## [3,] 15 12 14 21 11 25
## [4,] 32 16 6 2 17 18
## [5,] 24 5 13 8 36 19
## [6,] 22 26 23 30 34 27
##
## $Loc_Loc1$rep3
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 4 10 16 9 27 35
## [2,] 7 14 23 2 30 15
## [3,] 12 36 29 19 25 24
## [4,] 1 33 22 5 13 8
## [5,] 3 21 34 32 26 28
## [6,] 20 31 18 6 17 11
##
##
##
## rw_clm> head(rowcold1$fieldBook,12)
## ID LOCATION PLOT REP ROW COLUMN ENTRY TREATMENT
## 1 1 Loc1 101 1 1 1 18 G-18
## 2 2 Loc1 102 1 1 2 34 G-34
## 3 3 Loc1 103 1 1 3 9 G-9
## 4 4 Loc1 104 1 1 4 13 G-13
## 5 5 Loc1 105 1 1 5 28 G-28
## 6 6 Loc1 106 1 1 6 11 G-11
## 7 7 Loc1 107 1 2 1 17 G-17
## 8 8 Loc1 108 1 2 2 15 G-15
## 9 9 Loc1 109 1 2 3 29 G-29
## 10 10 Loc1 110 1 2 4 21 G-21
## 11 11 Loc1 111 1 2 5 30 G-30
## 12 12 Loc1 112 1 2 6 1 G-1
##
## rw_clm> # Example 2: Generates a row-column design with 3 full blocks and 30 treatments
## rw_clm> # and 5 rows, for one location.
## rw_clm> # In this case, we show how to use the option data.
## rw_clm> treatments <- paste("ND-", 1:30, sep = "")
##
## rw_clm> ENTRY <- 1:30
##
## rw_clm> treatment_list <- data.frame(list(ENTRY = ENTRY, TREATMENT = treatments))
##
## rw_clm> 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
##
## rw_clm> rowcold2 <- row_column(t = 30, nrows = 5, r = 3, l = 1,
## rw_clm+ plotNumber= c(101,1001),
## rw_clm+ locationNames = c("A", "B"),
## rw_clm+ seed = 15,
## rw_clm+ data = treatment_list)
##
## rw_clm> rowcold2$infoDesign
## $rows
## [1] 5
##
## $columns
## [1] 6
##
## $reps
## [1] 3
##
## $treatments
## [1] 30
##
## $locations
## [1] 1
##
## $location_names
## [1] 1
##
## $seed
## [1] 15
##
## $id_design
## [1] 9
##
##
## rw_clm> rowcold2$resolvableBlocks
## $Loc_1
## $Loc_1$rep1
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] "ND-28" "ND-1" "ND-21" "ND-2" "ND-30" "ND-18"
## [2,] "ND-16" "ND-11" "ND-24" "ND-29" "ND-19" "ND-22"
## [3,] "ND-4" "ND-25" "ND-26" "ND-17" "ND-14" "ND-8"
## [4,] "ND-5" "ND-12" "ND-23" "ND-3" "ND-13" "ND-10"
## [5,] "ND-27" "ND-7" "ND-15" "ND-9" "ND-6" "ND-20"
##
## $Loc_1$rep2
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] "ND-12" "ND-22" "ND-16" "ND-19" "ND-25" "ND-1"
## [2,] "ND-14" "ND-4" "ND-8" "ND-9" "ND-13" "ND-24"
## [3,] "ND-20" "ND-11" "ND-30" "ND-28" "ND-21" "ND-10"
## [4,] "ND-17" "ND-15" "ND-7" "ND-18" "ND-5" "ND-27"
## [5,] "ND-26" "ND-6" "ND-29" "ND-23" "ND-3" "ND-2"
##
## $Loc_1$rep3
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] "ND-23" "ND-14" "ND-16" "ND-13" "ND-7" "ND-21"
## [2,] "ND-1" "ND-28" "ND-6" "ND-29" "ND-9" "ND-8"
## [3,] "ND-30" "ND-25" "ND-26" "ND-18" "ND-15" "ND-27"
## [4,] "ND-4" "ND-22" "ND-10" "ND-24" "ND-5" "ND-12"
## [5,] "ND-17" "ND-2" "ND-3" "ND-11" "ND-20" "ND-19"
##
##
##
## rw_clm> head(rowcold2$fieldBook,12)
## ID LOCATION PLOT REP ROW COLUMN ENTRY TREATMENT
## 1 1 1 101 1 1 1 28 ND-28
## 2 2 1 102 1 1 2 1 ND-1
## 3 3 1 103 1 1 3 21 ND-21
## 4 4 1 104 1 1 4 2 ND-2
## 5 5 1 105 1 1 5 30 ND-30
## 6 6 1 106 1 1 6 18 ND-18
## 7 7 1 107 1 2 1 16 ND-16
## 8 8 1 108 1 2 2 11 ND-11
## 9 9 1 109 1 2 3 24 ND-24
## 10 10 1 110 1 2 4 29 ND-29
## 11 11 1 111 1 2 5 19 ND-19
## 12 12 1 112 1 2 6 22 ND-22