library(datasets)
data("sleep")
This data sleep describes the students’ extra sleep hour, group number and their ID in the group.
20 observations in this dataset.3 variables in this dataset. (numbers here are represented by inline r syntax)summary(sleep)
## extra group ID
## Min. :-1.600 1:10 1 :2
## 1st Qu.:-0.025 2:10 2 :2
## Median : 0.950 3 :2
## Mean : 1.540 4 :2
## 3rd Qu.: 3.400 5 :2
## Max. : 5.500 6 :2
## (Other):8
5.5, while max hour is 5.5. Their mean value is 1.54 . (numbers here are represented by inline r syntax)plot(sleep$extra~sleep$group,
main = "Students extra sleep hour distribution by group",
xlab = "Group", ylab = "Sleep Hour",
col = c("yellow","blue")
)