# Creating a sample dataset for Pooled Randomized Block Design (RBD)
df <- data.frame(
Loc = factor(rep(c("L1", "L2"), each = 9)), # Locations
Rep = factor(rep(c("R1", "R2", "R3"), each = 3, times = 2)), # Replications
Treatment = factor(rep(c("T1", "T2", "T3"), times = 6)), # Treatments
Yield = c(18, 7, 11, 10, 19, 12, 15, 8, 13,
18, 5, 11, 7, 19, 21, 22, 9, 14) # Yield values
)
# Running PooledRBD function on the dataset
out <- PooledRBD(df, "Yield", "Loc", "Treatment", "Rep", 0.05, 1)
# Print results
print(out)
Run the code above in your browser using DataLab