I’m trying to code an experiment for my research project but I’ve had a little trouble randomising something in the trials so would really appreciate some help.
The part of the study I’m stuck on involves two different types of trial, one where circles are used and one where crosses are used. I have used the conditions file below to assign the positions of the circles, with circle1 having its position set to “position1” and circle2 having its position set to “position2”. The file for crosses is the same, but replacing “circle” with “cross”, and the positions columns are identical.
What I want is for the programme to randomly select one of the rows from the “circlepositions.xlsx” file, show this, then present the stimuli which participants respond to (I don’t think explaining this part is necessary and may be tricky to understand, but let me know if it would help to know this part).
I then want the programme to randomly select one of the rows from the “crossppositions.xlsx” file, show this, then similarly present the stimuli which participants respond to, cycling through the 6 different stimuli twice.
I would then like it to go back to selecting a row from the circle file, then from the cross file and so on, without repeating the same row from the individual file (e.g., for trial 1 it uses “circlepositions.xlsx” row 4 and “crossppositions.xlsx” row 7, then for trial 2 it uses “circlepositions.xlsx” row 9 and “crossppositions.xlsx” row 4). So I want it to cycle through every row in each condition file, but only once.
I created a simplified version of this to demonstrate what the sequence looks like:
I understand that I can’t put a loop around each type of trial, because that will loop through all the rows of “circlepositions.xlsx”, then start looping through all the rows of “crossppositions.xlsx”, rather than alternating between them. I’m therefore not sure how to make it so that each type of trial uses a different conditions file.
Is there a way to do this, or could I combine the two condition files into one somehow, using selected rows for each type of trial? Any help would be really appreciated, thanks!