Preparing Data for Repeated-Measures ANOVA in R and SPSS


I have dummy data for an experiment done on two respondents. Each respondent is exposed to 8 chocolate packaging designs, and then asked about quality and other perceptions. The 8 designs are based on 3 factors (Colour with 2 levels: black and yellow, Shape with 2 levels: short and long, and Typeface with 2 levels: Ornate and Simple).

The respondent is either a male or a female. The purpose is to conclude that colour of chocolate package influences quality perception in male, and so on.

So, I have 1 between-subjects factor (gender), and 3 within-subject factors (Colour, Shape, and Typeface). I want conduct repeated measures ANOVA to reach the desired conclusions (test hypotheses).

The question is: how to prepare the data for SPSS and R tools. The picture shows the current format of the data.