Zara <- c(500,400,200,350,250)
Zara
## [1] 500 400 200 350 250
Colorbox <- c(150,100,250,170,200)
Colorbox
## [1] 150 100 250 170 200
Mango <- c(300,600,550,250,200)
Mango
## [1] 300 600 550 250 200
HnM <- c(80,100,150,250,200)
HnM
## [1] 80 100 150 250 200
PullandBear <- c(350,200,250,400,420)
PullandBear
## [1] 350 200 250 400 420
Harga <- data.frame(Zara,Colorbox,Mango,HnM,PullandBear)
Harga
## Zara Colorbox Mango HnM PullandBear
## 1 500 150 300 80 350
## 2 400 100 600 100 200
## 3 200 250 550 150 250
## 4 350 170 250 250 400
## 5 250 200 200 200 420
#Membuat Histogram Tinggi
hist(Harga$Colorbox, main="Plot Histogram", col = "pink")

#Membuat boxplot
boxplot(Harga, main="Plot Boxplot", col="red")

#Membuat matriks korelasi
cor(Harga)
## Zara Colorbox Mango HnM PullandBear
## Zara 1.00000000 -0.7973335 -0.09762379 -0.5279373 -0.01753425
## Colorbox -0.79733350 1.0000000 -0.13723347 0.3996723 0.23944315
## Mango -0.09762379 -0.1372335 1.00000000 -0.5350216 -0.99148658
## HnM -0.52793734 0.3996723 -0.53502156 1.0000000 0.62527795
## PullandBear -0.01753425 0.2394431 -0.99148658 0.6252780 1.00000000