Reply To: Unable to randomize fillers and experimental items

PennController for IBEX Forums Support Unable to randomize fillers and experimental items Reply To: Unable to randomize fillers and experimental items

#10362
nasimbhmn
Participant

Hi Jeremy,
I have a related question, so I am asking it below this thread.

In the example template you created above, let’s assume I have a column “QUESTION” but only in the fillers table. And this column is empty for half of the filler items. I have revised your script as below, but I receive an error message saying that “No column named ‘QUESTION’ found in table experimental.csv”. Could you please help me resolve it?

experimental.csv:

ITEM,SENTENCE,COMPATIBILITY,SUBJECT,LIST,TYPE, 
101,Sentence 1,1,subject1,A,item
201,Sentence 2,1,subject1,B,item
102,Sentence 3,2,subject2,B,item
202,Sentence 4,2,subject2,A,item

fillers.csv:

ITEM,SENTENCE,COMPATIBILITY,SUBJECT,TYPE,QUESTION
501,Filler 1,.,.,filler,QUESTION501
502,Filler 2,.,.,filler,
503,Filler 3,.,.,filler,QUESTION502

Sample script:

function_for_template = row => newTrial( row.TYPE ,
      newText( row.SENTENCE ).print()
      ,
      newScale("answer", "True", "False").button().print().log().wait()
      ,
      ...(table.Question!==undefined && table.QUESTION ? [
            newText("question", table.QUESTION).print()
            ,
            newScale("answer", "yes", "no")
                .keys("f", "j")
                .button()
                .print()
                .log()
                .wait()
        ] : [null])
)
.log("item", row.ITEM)
.log("compatibility", row.COMPATIBILITY)
.log("subject", row.SUBJECT)
.log("list", (row.LIST===undefined?"filler":row.LIST))

Template("experimental.csv", function_for_template)
Template("fillers.csv", function_for_template)

Thanks in advance!

  • This reply was modified 1 year, 1 month ago by nasimbhmn.