
Last chance! 50% off unlimited learning
Sale ends in
# Creating a sample dataset for Pooled Completely Randomized Design (CRD)
df <- data.frame(
Loc = factor(rep(c("L1", "L2"), each = 9)), # Locations
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 PooledCRD function on the dataset
out <- PooledCRD(df, "Yield", "Loc", "Treatment", 0.05, 1)
# Print results
print(out)
Run the code above in your browser using DataLab