driving.Rdatafile.head( driving )to look at the first few observationslsr, psychload( "~/Work/Research/Rbook/workshop_dsto/datasets/driving.Rdata")
head( driving )
library(lsr)
library(psych)table()to construct a tabulation of the distractorvaribletable()to cross-tabulate distractorby peak.hourxtabs()to cross-tabulate distractorby peak.hourdescribeto get descriptives for all variables in driving(this will produce some warnings!)summaryto get descriptives for all variables in drivingdescribeByto get descriptives separately depending on whether the tests were conducted in peak hour or not (this will produce some warnings!)aggregateto calculate the mean number of errors in the first test (i.e. errors_time1) broken down by peak.hourand distractorcor()cor()correlate()to compute all pairwise correlations.