I plot a simple linear regression using R. I would like to save that image as PNG or JPEG, is it possible to do it automatically? (via code)
There are two different
plotpath<- file.path(path, "PLOT_name",paste("plot_",file,".png",sep="")) png(filename=plotpath) plot(x,y, main= file) dev.off()