The following packages are required for this practical:
library(dplyr)
library(magrittr)
library(mice)
library(ggplot2)
and if you’d like the same results as I have obtained, you can fix the random seed
set.seed(123)
age
and bmi
in the mice::boys
data setbmi < 18.5
use color = "light blue"
bmi > 18.5 & bmi < 25
use color = "light green"
bmi > 25 & bmi < 30
use color = "orange"
bmi > 30
use color = "red"
age
in the boys
data setreg
in the boys data set With a standard plotting device in R
:hgt
with different boxes for reg
in the boys
data set With a standard plotting device in R
:age
with different curves for boys from the city
and boys from rural areas (!city
).hgt
in the boys
data set, that displays for every age
year that year’s mean height in deviations from the overall average hgt
End of Practical