Find the following properties of the data in the (built-in) dataframe sleep
:
- The classes of the different variables. Store this result in a vector called
classes
.
- The 5, 25, 50, 75 and 95 percentile for all numeric variables. Store this result in a matrix called
percentiles
.
- The number of unique values for the factor variables. Store this result in a vector called
uniques
.
- The mean value of the numeric column
extra
for every combination of possible levels of the factors group
and ID
. Store this result(s) in a matrix called means
.