Although I know how to compute the mean in R, I can't seem to understand how to do it for different conditions. Other posts that I have read were not as complicated.
> Target/dictractor TrialType Bin0 Bin1 Bin2 Bin3
1 Target 2C 3 0 2 0
1 Target 2C 2 0 3 0
1 Target 2E 0 1 1 2
1 Target 2E 0 0 0 0
1 Distractor 2C 0 3 0 1
1 Distractor 2C 0 0 0 0
1 Distractor 2E 0 0 1 0
1 Distractor 2E 0 0 0 3
2 Target 2C 1 1 0 1
2 Target 2C 2 0 0 2
2 Distractor 2E 0 0 0 0
2 Distractor 2E 0 0 0 0
Given the data set above I would like to get the mean of each bin (Bin0
, Bin1
, Bin2
) for each subject for each TrialType
for Target/dictractor
separately. For example, for subject 1 I would like to compute the mean of each bin, for TrialType
2C
, in a Target
condition, then the mean for each bin for TrialType
2E
in a Target
condition, then mean for each bin for TrialType
2C
in Distractor
condition and TrialType
2E
in Distractor
.