View source: R/fct_latin_square.R
latin_square | R Documentation |
Randomly generates a latin square design of up 10 treatments.
latin_square(
t = NULL,
reps = 1,
plotNumber = 101,
planter = "serpentine",
seed = NULL,
locationNames = NULL,
data = NULL
)
t |
Number of treatments. |
reps |
Number of full resolvable squares. By default |
plotNumber |
Starting plot number. By default |
planter |
Option for |
seed |
(optional) Real number that specifies the starting seed to obtain reproducible designs. |
locationNames |
(optional) Name for the location. |
data |
(optional) Data frame with label list of treatments. |
A list with information on the design parameters.
Data frame with the latin square field book.
A list with two elements.
infoDesign
is a list with information on the design parameters.
fieldBook
is a data frame with the latin square field book.
Didier Murillo [aut], Salvador Gezan [aut], Ana Heilman [ctb], Thomas Walk [ctb], Johan Aparicio [ctb], Thiago de Paula Oliveira[ctb] Richard Horsley [ctb]
Federer, W. T. (1955). Experimental Design. Theory and Application. New York, USA. The Macmillan Company.
# Example 1: Generates a latin square design with 4 treatments and 2 reps.
latinSq1 <- latin_square(t = 4,
reps = 2,
plotNumber = 101,
planter = "cartesian",
seed = 1980)
print(latinSq1)
summary(latinSq1)
head(latinSq1$fieldBook)
# Example 2: Generates a latin square design with 5 treatments and 3 reps.
latin_data <- data.frame(list(ROW = paste("Period", 1:5, sep = ""),
COLUMN = paste("Cow", 1:5, sep = ""),
TREATMENT = paste("Diet", 1:5, sep = "")))
print(latin_data)
latinSq2 <- latin_square(t = NULL,
reps = 3,
plotNumber = 101,
planter = "cartesian",
seed = 1981,
data = latin_data)
latinSq2$squares
latinSq2$plotSquares
head(latinSq2$fieldBook)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.