I'm trying to write many graphs to one olocation, but instead its writing a bunch of blank pictures:
my code looks like:
titleplot<-NULL
for(i in 1:99){
titleplot<-colnames(data[i])
mypath <- file.path("C:","Users","user.ME","Desktop","graph outputs", paste("myplot_", titleplot, ".jpg", sep = ""))
plot(data[,i],type="l", main =titleplot)
jpeg(file=mypath)
dev.off()
}
Does anyone know why this would happen or how I can remedy this?