Please help! R homework
I've been trying for hours to find a solution that will help me put "train" and its relevant data before "test" on the x axis.
I've tried to relevel()
my factors and order them by decreasing = FALSE
, but I am still unable to swap the positions of "test" and "train".
The code I'm running for this ggplot is:
ggplot(all.dat, aes(x = data, y = r2)) +
geom_point(colour = "grey") +
geom_pointrange(data = final.plot, aes(x = data, y = r2, ymin = se.lower, ymax = se.upper, colour = data), size = 1) +
scale_color_discrete(breaks = c("train", "test")) +
theme_bw()
This is the last question for my assignment, and I just want to be done with it :( I would really appreciate if anyone could help me solve this issue!