# Example 1: Generates a spatial unreplicated optimized arrangement design in one location
# with 120 genotypes + 20 check plots (4 checks) for a field with dimension 14 rows x 10 cols.
if (FALSE) {
optim_unrep1 <- optimized_arrangement(
nrows = 14,
ncols = 10,
lines = 120,
amountChecks = 20,
checks = 1:4,
planter = "cartesian",
plotNumber = 101,
exptName = "20RW1",
locationNames = "CASSELTON",
seed = 14124
)
optim_unrep1$infoDesign
optim_unrep1$layoutRandom
optim_unrep1$plotNumber
head(optim_unrep1$fieldBook, 12)
}
# Example 2: Generates a spatial unreplicated optimized arrangement design in one location
# with 200 genotypes + 20 check plots (4 checks) for a field with dimension 10 rows x 22 cols.
# As example, we set up the data option with the entries list.
if (FALSE) {
checks <- 4
list_checks <- paste("CH", 1:checks, sep = "")
treatments <- paste("G", 5:204, sep = "")
REPS <- c(5, 5, 5, 5, rep(1, 200))
treatment_list <- data.frame(list(ENTRY = 1:204, NAME = c(list_checks, treatments), REPS = REPS))
head(treatment_list, 12)
tail(treatment_list, 12)
optim_unrep2 <- optimized_arrangement(
nrows = 10,
ncols = 22,
planter = "serpentine",
plotNumber = 101,
seed = 120,
exptName = "20YWA2",
locationNames = "MINOT",
data = treatment_list
)
optim_unrep2$infoDesign
optim_unrep2$layoutRandom
optim_unrep2$plotNumber
head(optim_unrep2$fieldBook,12)
}
Run the code above in your browser using DataLab