I am doing loop ploting, and want to print plots into pdf. what should I do. I am very confused.
the looping codes looks like this:
for (i in 1:12)){
df<-Sample.Data %>% filter(ID==i)
p1 <- ggplot(data =df)+
geom_line(aes(x = Days, y = Result, color = Item))+
print(p1)
}
then, what should I do?