# NOT RUN {
# the original data was in wide format; for analysis with hidden Markov models,
# data in long format is more convenient; the following code was used to reshape
# the data from wide to long format (and make a selection of the columns)
data(dccs)
dccslong <- reshape(
dccs[,c("pp","ageM","sex","t1Post","t2Post","t3Post","t4Post","t5Post","t6Post")],
direction="long",
varying=list(4:9) )
dccslong <- dccslong[order(dccslong$pp),-6]
names(dccslong) <- c("pp","ageM","sex","trial","acc")
# }
Run the code above in your browser using DataLab