# Creating a sample dataset for Pooled Split Plot Design (SPD)
df <- data.frame(
Location = factor(rep(c("Londan", "Agumbe"), each = 12)), # Locations
Replication = factor(rep(c(1, 2), each = 6, times = 2)), # Replications
MainPlot = factor(rep(c(1, 2), each = 3, times = 4)), # Main plot factor
SubPlot = factor(rep(1:3, times = 8)), # Sub plot factor
Yield = c(4940, 4810, 5150, 4900, 4920, 5070,
4830, 5110, 4920, 5020, 5110, 5230,
4964, 4997, 5011, 5102, 4858, 4888,
5100, 5165, 4965, 5113, 5086, 5176) # Yield values
)
# Running PooledSPD function on the dataset
out <- PooledSPD(df, "Yield", "Location", "Replication", "MainPlot", "SubPlot", 0.05, 1)
# Print results
print(out)
Run the code above in your browser using DataLab