Constructing simulated datasets for sensible controls, making appropriate comparisons to an expected background distribution, and having a proper background population from which to draw samples can be important aspects of many studies. In this recipe, we'll look at various ways of generating these either from scratch or by mixing up an existing dataframe.
Generating a simulated dataset to represent a background
Getting ready
We'll use the fakeR package and the iris built-in dataset.
How to do it...
Generating a simulated dataset to represent a background can...