driving.Rdata
file.head( driving )
to look at the first few observationslsr
load( "~/Work/Research/Rbook/workshop_dsto/datasets/driving.Rdata")
head( driving )
library(lsr)
wideToLong()
to make a long-form version of the driving
data frame. Save the results to driving.2
within
argument to specifiy a good name for itlongToWide()
function to make a wide-form version of the driving.2
data frame that you created in 2.5.1. Save the results to driving.3
cut()
to cut driving$age
into 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$age
into 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$distractor
and 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$distractor
to check that you have successfully reordered the groups, and now use bars()
to redraw the plot.