Bentuk 1 buah data (bebas) berisi 5 kolom dan 5 baris kemudian buatkan plot serta hitung korelasinya. Kemudian upload hasil pada rpubs yang sudah dibentuk.
data.students <- data.frame(ID = c(15,25,35,45,55), AGE = c(17,18,21,15,23), ENGLISH = c(55,45,35,42,27), MATH = c(78,56,50,45,38), SOCIAL = c(65,50,49,35,67)); data.students
## ID AGE ENGLISH MATH SOCIAL
## 1 15 17 55 78 65
## 2 25 18 45 56 50
## 3 35 21 35 50 49
## 4 45 15 42 45 35
## 5 55 23 27 38 67
hist(data.students$ID, main="Plot Histogram Id", col = "red")
hist(data.students$AGE, main="Plot Histogram Age", col = "blue")
hist(data.students$ENGLISH, main="Plot Histogram English", col = "green")
hist(data.students$MATH, main="Plot Histogram Math", col = "brown")
hist(data.students$SOCIAL, main="Plot Histogram Social", col = "purple")
boxplot(data.students, main="Plot Boxplot Value", col="yellow")
cor(data.students)
## ID AGE ENGLISH MATH SOCIAL
## ID 1.0000000 0.4455664 -0.88464621 -0.9430178 -0.13253974
## AGE 0.4455664 1.0000000 -0.77349097 -0.4442898 0.59174558
## ENGLISH -0.8846462 -0.7734910 1.00000000 0.9049352 -0.06106435
## MATH -0.9430178 -0.4442898 0.90493522 1.0000000 0.29542462
## SOCIAL -0.1325397 0.5917456 -0.06106435 0.2954246 1.00000000