I have a data table called "vsample2.csv" that looks like this:
I need it to look like this in a new data table that I would create:
Tried with dcast but doesn't seem to work. I don't want a function. Just a line or two.
I need to do a repeated measures anova with the data. E & H being variable level 1 and C & IC being variable level 2. I need the significance values of the variable level 1, 2 and then their interaction.
Data
set.seed(1)
dd <- data.frame(
subject = paste('Subject', rep(1:4, each = 4)),
lang = rep(c('H', 'E'), each = 2),
resp = c('C', 'IC'),
p = runif(16),
stringsAsFactors = FALSE
)