Testing a 2 by 2 mixed ANOVA in R I have data from an experiment that is testing how the order of two studying methods (visual or auditory) affects word recall. For analysis a multi-factor anova with a repeated measure is appropriate, but I am not sure if I am structuring my data correctly. 
This is the command I'm using:
aov(recalled_items~task*order)+Error(subject/task)+(order))
Here is an example of the data structure:
Subject    Task    Order    Recalled Items
A        Visual    First       13
A       Auditory   Second      22
B        Visual    First       14
B       Auditory   Second      28
C        Visual    Second      10
C       Auditory   First       15
D        Visual    Second      14
D       Auditory   First       29



*

*Does R know to compare Visual 1 and Visual 2 recall values and Auditory 1 and Auditory 2 recall values? 


I am worried that because of the way I structured my data R is just comparing Visual 1 and Auditory 1 and as a result I am getting no effect.
 A: Your method won't work because it's going to treat order within.  Try this...
Subject    Task    Order    Recalled Items
A        Visual    vFirst      13
A       Auditory   vFirst      22
D        Visual    aFirst      14
D       Auditory   aFirst      28

Or something like that.
A: Assuming that John's correction to the data is correct, you can use the ezANOVA function from the ez package:
my_anova = ezANOVA(
    data = my_data
    , dv = .(recalled_items)
    , wid = .(Subject)
    , within = .(Task)
    , between = .(Order)
)

print(my_anova)
However, as I note in a comment below your question, it looks like your data represents the number of items recalled from a list of study items, in which case it would be more appropriate to analyze the raw item-by-item recall data. See my answer to this question for a description of how to achieve this. That answer explicitly speaks to recognition memory type scenarios where one typically wants to dissociate response bias from discriminability. If your context if free recall, then you would simply have data labelling each studied word as recalled or not-recalled and this would be your response variable. You would then predict this response as a function of the explanatory variables in your study and their effect would represent the change in likelihood (on the log-odds scale) of recall.
