randomly splitting item into two

randomly splitting item into two
 Author Message anisa_khalfan Group: Forum Members Posts: 2, Visits: 6 I have an item with 14 foods, and I want to randomly divide half into an item called natural_condition and the other half into an item called health_condition each time a participant runs the experiment. Is there a function that lets me do this? I have attached the item code below. Thanks in advance. /1 = "Cheetos_4_25pc.jpg"/2 = "Aero_2_.5bar.jpg"/3 = "Twizzlers_3_4.jpg"/4 = "TeddyGrahams_2_15pc.jpg"/5 = "Snickers_1_0.5bar.jpeg"/6 = "Skittles_4_0.25pack.jpg"/7 = "ChipsAhoy_4_2cookies.jpg"/8 = "RitzBits_4_15pieces.jpg"/9 = "RufflesAllDressed_3_10chips.jpg"/10= "Smartfood_3_32Chips.jpg"/11 = "Spinach_2_.5c.jpg"/12 = "Orange_2_0.5orange.jpg"/13 = "GreenGrapes_3_12.jpg"/14 = "BrusselsSprouts_3_0.5box.jpg" Dave posted 2 Months Ago ANSWER Group: Administrators Posts: 10K, Visits: 58K +x anisa_khalfan - 6/16/2020I have an item with 14 foods, and I want to randomly divide half into an item called natural_condition and the other half into an item called health_condition each time a participant runs the experiment. Is there a function that lets me do this? I have attached the item code below. Thanks in advance. /1 = "Cheetos_4_25pc.jpg"/2 = "Aero_2_.5bar.jpg"/3 = "Twizzlers_3_4.jpg"/4 = "TeddyGrahams_2_15pc.jpg"/5 = "Snickers_1_0.5bar.jpeg"/6 = "Skittles_4_0.25pack.jpg"/7 = "ChipsAhoy_4_2cookies.jpg"/8 = "RitzBits_4_15pieces.jpg"/9 = "RufflesAllDressed_3_10chips.jpg"/10= "Smartfood_3_32Chips.jpg"/11 = "Spinach_2_.5c.jpg"/12 = "Orange_2_0.5orange.jpg"/13 = "GreenGrapes_3_12.jpg"/14 = "BrusselsSprouts_3_0.5box.jpg"You do something like this:/ poolsize = 14/ selectionrate = always// item numbers we'll use in the health condition// item numbers we'll use in the natural condition// put 7 random item numbers out of 14 into the health list// put the remaining 7 item numbers out of 14 into the natural list / onexptbegin = [    list.healthitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.healthitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.healthitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.healthitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.healthitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.healthitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.healthitemnumbers.appenditem(list.allitemnumbers.nextindex);        list.naturalitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.naturalitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.naturalitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.naturalitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.naturalitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.naturalitemnumbers.appenditem(list.allitemnumbers.nextindex);    list.naturalitemnumbers.appenditem(list.allitemnumbers.nextindex);]/ blocks = [1=myblock]/ trials = [1-14 = noreplace(healthtrial, naturaltrial)]/ stimulusframes = [1=healthpic]/ validresponse = (57)/ stimulusframes = [1=naturalpic]/ validresponse = (57)/ items = foodpic/ select = list.healthitemnumbers.nextvalue/ items = foodpic/ select = list.naturalitemnumbers.nextvalue/1 = "Cheetos_4_25pc.jpg"/2 = "Aero_2_.5bar.jpg"/3 = "Twizzlers_3_4.jpg"/4 = "TeddyGrahams_2_15pc.jpg"/5 = "Snickers_1_0.5bar.jpeg"/6 = "Skittles_4_0.25pack.jpg"/7 = "ChipsAhoy_4_2cookies.jpg"/8 = "RitzBits_4_15pieces.jpg"/9 = "RufflesAllDressed_3_10chips.jpg"/10= "Smartfood_3_32Chips.jpg"/11 = "Spinach_2_.5c.jpg"/12 = "Orange_2_0.5orange.jpg"/13 = "GreenGrapes_3_12.jpg"/14 = "BrusselsSprouts_3_0.5box.jpg"

Merge Selected

Merge into selected topic...

Merge into merge target...

Merge into a specific topic ID...