I'm trying to plot my fit in R and I I get the following error:
Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ
Here is my code:
exercise <- as.factor(c(10, 10, 20, 20, 10, 10, 20, 20))
time <- c("pm", "am", "am", "pm", "am", "pm", "pm", "am")
glucose <- c(71.5, 103, 83.5, 126, 125.5, 129.5, 95, 93)
fit1 <- aov(glucose ~ exercise + time)
summary(fit1)
par(mfrow = c(2, 2))
plot(fit1)