What I want: draw text in one of two locations, never both locations in the same trial. Random without replacement.
What I’ve done initially: 2 columns in an Excel file, with each row having EITHER: the text (‘X’) or a blank cell. Then in builder, I have two text objects that get the text from each column
Problem: it seems to get a different random for each, so on some trials an X appears in either text location as expected, but on some trials it puts both.
Another alternative: I solved it with a X and Y columns in Excel, where all values in Y are the same, and then specified a constant text X at position $(x,y). Now how would I do that where x and y can be different locations (like in a grid), but preserve equal chance and # of iterations? I’m not sure which direction is best to go.
You’re most of the way there. What you want is just a single text component, with its location controlled by a column or columns in the conditions file. You would then only have a single column for the text content. But if it is always the same value (“X”), then you don’t even need that column. Just put a constant value of X in the text field. Then all that alters on each trial is the position of that text.
The randomness without replacement is handled by the random or full random setting of the loop dialog.
Thanks, it was easier once I figured out the syntax: $(x,y) not ($x, $y)
I still couldn’t get the randomness working, with regular random, not full replacement. It picks all the rows a single time each, but not always the same row, different column in two components. I see how the coded location works better anyway.
It’s not really a problem, as I solved it the other way. But to be explicit:
I solved it by using one Text component, and picking the x,y position from a single column in an Excel document.
The other way I thought of is to use two Text components at fixed locations, and then draw from two columns, one of which has the character I want (X) and the other blank (i.e. draw nothing). Each row has in X in one of the two columns, never both. Then using either random or fullRandom, I’d want it so it grabs a random number at the start of the loop, and uses the same number to pick the same row from both columns, so every trial is either (“X”, “”) or ("", “X”). Instead, it seems to get a different random each time it pulls up a Text component, so it can be (“X”, “”) or ("", “X”) or (“X”, “X”).
Hope that second one made sense. I assume I can do it with code, I just thought the random would have the same value in the entire component.