# NOT RUN {
## First get the resid's and store the plots as an object
myresids <- get.resids(lhrh, covars)
p.resids <- plot(myresids, cols=TRUE)
## Open a new plot device for each set of 9
lapply(p.resids, function(x) {dev.new(); print(x)})
## Save as a multi-page PDF; requires \code{gridExtra}
ml <- marrangeGrob(p.resids, nrow=1, ncol=1)
ggsave('residuals.pdf', ml)
# }
Run the code above in your browser using DataLab