- load the
`driving.Rdata`

file. - type
`head( driving )`

to look at the first few observations - load the following packages:
`lsr`

,`psych`

```
load( "~/Work/Research/Rbook/workshop_dsto/datasets/driving.Rdata")
head( driving )
library(lsr)
library(psych)
```

- compute the mean age of the participants
- compute the median age of the participants
- compute the modal age of the participants (note what happens when there are multiple modal frequencies)

- compute the standard deviation age of the participants
- compute the age range of the participants
- compute the interquartile range on the age of the participants
- compute the 10th, 25th, 75th and 90th percentiles for age

- use
`table()`

to construct a tabulation of the`distractor`

varible - now use
`table()`

to cross-tabulate`distractor`

by`peak.hour`

- use
`xtabs()`

to cross-tabulate`distractor`

by`peak.hour`

- use
`describe`

to get descriptives for all variables in`driving`

(this will produce some warnings!) - use
`summary`

to get descriptives for all variables in`driving`

- use
`describeBy`

to get descriptives separately depending on whether the tests were conducted in peak hour or not (this will produce some warnings!) - use
`aggregate`

to calculate the mean number of errors in the first test (i.e.`errors_time1`

) broken down by`peak.hour`

and`distractor`

- calculate the correlation of the number of errors at time 1 with the number of errors at time 2 using
`cor()`

- calculate the Spearman correlation for the same variables, again using
`cor()`

- use
`correlate()`

to compute all pairwise correlations.