# Example 1: Generates a square lattice design with 5 full blocks, 8 units per IBlock,
# 8 IBlocks for a square number of treatmens of 64 in two locations.
squareLattice1 <- square_lattice(t = 64, k = 8, r = 5, l = 2,
plotNumber = c(1001, 2001),
locationNames = c("FARGO", "MINOT"),
seed = 1986)
squareLattice1$infoDesign
head(squareLattice1$fieldBook,12)
# Example 2: Generates a square lattice design with 3 full blocks, 7 units per IBlock,
# 7 IBlocks for a square number of treatmens of 49 in one location.
# In this case, we show how to use the option data.
treatments <- paste("G", 1:49, sep = "")
ENTRY <- 1:49
treatment_list <- data.frame(list(ENTRY = ENTRY, TREATMENT = treatments))
head(treatment_list)
squareLattice2 <- square_lattice(t = 49, k = 7, r = 3, l = 1,
plotNumber = 1001,
locationNames = "CASSELTON",
seed = 1986,
data = treatment_list)
squareLattice2$infoDesign
head(squareLattice2$fieldBook,12)
Run the code above in your browser using DataLab