This is for creating sampling design for my experiment. I want to survey 8 different individuals on every Monday of the year 2018. Order in which I survey them needs to be random for each Monday. For eg. A,B,C,D... for one Monday and then for next C,B,A,D....
To try this with R, I have a list of names namelist<- ("A", "B", "C"....) containing 8 different names. I want to assign these in random order to every Monday in a year. For this, I have created a list of dates for the entire year 2018. X<- ("01-01-2018", "02-01-2018"...) and list of corresponding weekdays Y<- ("Monday", "Tuesday"...).
Now, for example, I need entire namelist assigned in random order of names for 01-01-2018 in "X" because it`s Monday similarly to all the Mondays in "X". What is the best way to go about it? I am a newbie in R, I would appreciate your help. Can I use for-loop for this? or is there any other way to do this?
Aucun commentaire:
Enregistrer un commentaire