savePlot('test2.jpg',type = 'jpg')
or
jpeg('test3.jpg')
x[,plot(height,weight)]
dev.off()

pdf('test4.pdf')
x[,plot(height,bmi)]

dev.off()

for(i in 1:4){
jpeg('i.jpg');
hd[V1==i,hist(V4)];
dev.off()
}

for(i in unique(hd$V2)){
jpeg(paste(i,'jpg',sep ='.'));
hd[V2==i,hist(V7)];
dev.off()
}
for(i in unique(hd$V2)){
jpeg(paste(i,'jpg',sep ='.'));
hd[V2==i,boxplot(V7)];
dev.off()
}
for(i in unique(hd$V1)){
jpeg(paste(i,'jpg',sep="."))
hd[V1==i, plot(V6,V21,col="maroon",main=paste('Intecept:',round(coef(lm(hd$V6~hd$V21))[1],4),'Slope:',round(coef(lm(hd$V6~hd$V21))[2],4)))]
dev.off()
}

+      ▷میــــــــم◁  |