RCBD {FielDHub} | R Documentation |
Generates a Randomized Complete Block Design (RCBD)
Description
It randomly generates a randomized complete block design (RCBD) across locations.
Usage
RCBD(
t = NULL,
reps = NULL,
l = 1,
plotNumber = 101,
continuous = FALSE,
planter = "serpentine",
seed = NULL,
locationNames = NULL,
data = NULL
)
Arguments
t |
An integer number with total number of treatments or a vector of dimension t with labels. |
reps |
Number of replicates (full blocks) of each treatment. |
l |
Number of locations. By default |
plotNumber |
Numeric vector with the starting plot number for each location. By default |
continuous |
Logical value for plot number continuous or not. By default |
planter |
Option for |
seed |
(optional) Real number that specifies the starting seed to obtain reproducible designs. |
locationNames |
(optional) Names for each location. |
data |
(optional) Data frame with the labels of treatments. |
Value
A list with five elements.
-
infoDesign
is a list with information on the design parameters. -
layoutRandom
is the RCBD layout randomization for each location. -
plotNumber
is the plot number layout for each location. -
fieldBook
is a data frame with the RCBD field book design.
Author(s)
Didier Murillo [aut], Salvador Gezan [aut], Ana Heilman [ctb], Thomas Walk [ctb], Johan Aparicio [ctb], Richard Horsley [ctb]
References
Federer, W. T. (1955). Experimental Design. Theory and Application. New York, USA. The Macmillan Company.
Examples
# Example 1: Generates a RCBD design with 3 blocks and 20 treatments across 3 locations.
rcbd1 <- RCBD(t = LETTERS[1:20], reps = 5, l = 3,
plotNumber = c(101,1001, 2001),
continuous = TRUE,
planter = "serpentine",
seed = 1020,
locationNames = c("FARGO", "MINOT", "CASSELTON"))
rcbd1$infoDesign
rcbd1$layoutRandom
rcbd1$plotNumber
head(rcbd1$fieldBook)
# Example 2: Generates a RCBD design with 6 blocks and 18 treatments in one location.
# In this case, we show how to use the option data.
treatments <- paste("ND-", 1:18, sep = "")
treatment_list <- data.frame(list(TREATMENT = treatments))
head(treatment_list)
rcbd2 <- RCBD(reps = 6, l = 1,
plotNumber = 101,
continuous = FALSE,
planter = "serpentine",
seed = 13,
locationNames = "IBAGUE",
data = treatment_list)
rcbd2$infoDesign
rcbd2$layoutRandom
rcbd2$plotNumber
head(rcbd2$fieldBook)