Pertanyaan 2
Setelah Anda mempelajari materi sesi ini, buatlah 2 contoh Program R serta
lampirkan hasil output R tsb.
JAWABAN:
>#1
> a<-matrix(c(1,2,2,3,3,4),3,2)
> layout(a)
> layout.show(4)
>#2
> x<-c(2,1,2,4,1,2,3,4,2,3,1)
> y<-c(4,3,4,4,3,4,5,4,4,5,3)
> sunflowerplot(x,y)
>#3A
> a<-matrix(c(1,1,2,3,3,4),2,3)
> layout(a)
> layout.show(4)
>#3B
> x<-c(4,5,6,1,2,5,6,1,1,6,5)
> y<-c(6,4,2,2,8,7,6,2,2,2,1)
> sunflowerplot(x,y)