[R] Simpan grafik dalam JPEG


#deklarasi nama file
jpeg('myplot.jpg')
#creating axis X data
datax <- c(1,3,2,5,3,7,5,3,2,7)
#creating random data for Y
y <- runif(10, 1, 100)
plot(y ~ datax , main="Contoh plot", xlab="data X", ylab="data Y")
dev.off()

Result :

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s