Building an experiment that uses R