I am trying to change my data from long to wide format. It is a factorial design with one between subject and two within subject variables.
My data: https://drive.google.com/file/d/0B9lnMw6dkH9KZUZKQkh4M3BIbGM/view?usp=sharing
When I try
library(reshape2)
data.wide<- dcast(correct.anal,group+subnum~speed+int, value.var="corr")
on the data, it says
Aggregation function missing: defaulting to length
I do not have duplicate values though so I do not understand what I need to do.
What I want to achieve is to get from my current data to output one line per subject with 22 columns (subnum, group and the twenty combinations).
Can anyone help with that?