driving.Rdatafile.head( driving )to look at the first few observationslsrload( "~/Work/Research/Rbook/workshop_dsto/datasets/driving.Rdata")
head( driving )
library(lsr)wideToLong()to make a long-form version of the drivingdata frame. Save the results to driving.2withinargument to specifiy a good name for itlongToWide()function to make a wide-form version of the driving.2data frame that you created in 2.5.1. Save the results to driving.3cut()to cut driving$ageinto 3 bins of approximately equal size (i.e. similar age ranges). Save the result to age.group.1.table()to look at how many people fall in the different age groups, and look at the category names to see how wide each of the age groups are.quantileCut()to cut driving$ageinto 3 bins of approximately equal frequency (i.e., similar number of people in each group). Save the result to age.group.2.table()to look at how many people fall in the different age groups, and look at the category names to see how wide each of the age groups are.driving$distractorand take note of the ordering of factor levelsbars()to plot means and confidence intervals for RT at time 1 for each distractorpermuteLevels()to reorder the factor levels for distractor.driving$distractorto check that you have successfully reordered the groups, and now use bars()to redraw the plot.