Plots Plot Types
Creating Some Data
For some of the following plotting methods, we will need the following data:
set.seed(42) # making the code reproducible
data_vec <- rnorm(mean = 20, sd = 2, n = 54)
matrix(data_vec, nrow = 6)
## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
## [1,] 22.74 23.02 17.22 15.12 23.79 20.91 18.43 21.52 19.14
## [2,] 18.87 19.81 19.44 22.64 19.14 21.41 18.30 18.55 21.31
## [3,] 20.73 24.04 19.73 19.39 19.49 22.07 15.17 17.26 20.64
## [4,] 21.27 19.87 21.27 16.44 16.47 18.78 20.07 20.87 18.43
## [5,] 20.81 22.61 19.43 19.66 20.92 21.01 20.41 18.38 23.15
## [6,] 19.79 24.57 14.69 22.43 18.72 16.57 19.28 22.89 21.29
Aarhus University Biostatistics - Why? What? How? 29 / 52