I want to generate a multiple line plot, grouped on userID, but with subjects in two classes. I'd like to different colors for the lines of the two groups. (I also have a smooth, but that works OK.) I have to use the group parameter to tell the program which points to connect, but I can''t figure out how to tell the program to use different colors for the two "classes" of subjects. Any help showing me the needed magic would be gratefully received.
Fsigt6a %>% filter(is.na(flag)) %>% ggplot(aes(12*dptp1/365.25, AIRg, group=cpid)) + geom_line() + geom_smooth(group = 1, se = F, color = 'red') + labs(x = "Months relative to first PHPI transplant", title = "Course of AIRg, CIT-06 subjects")
fsigt..pdf (2.7 KB)