1 year ago

#336486

test-img

Cheloniax

How to create a randomised field survey roster in R?

I would like to create a random field survey roster in R.

I have a team of 5 people surveying every day for 7 days. I need to split 4 people into 2 teams, with 1 person off each day. Each team visits 1 out of 2 plots every day. I want to ensure that each plot is visited as equally as possible by all people over the 7 day survey period.

My expected outcome is to have something like the following table but with the people randomised for each day, equally distributed across plots (plotA, plotB, off) for the seven days.

plot day1 day2 day3 day4 day5 day6 day7
plotA Peter Peter Peter Peter Peter Peter Peter
plotA Maria Maria Maria Maria Maria Maria Maria
plotB Brian Brian Brian Brian Brian Brian Brian
plotB Steph Steph Steph Steph Steph Steph Steph
off Sharon Sharon Sharon Sharon Sharon Sharon Sharon

I've tried using the sample() function but cannot get it to do what I want.

r

random

sampling

0 Answers

Your Answer

Accepted video resources