I'm building some example data and need to be able to have some data for each combination of 3 variable factor.
I have 3 vectors each with 3 permutations:
fruit <- c("pears", "apples", "grapes")
veg <- c("carrots", "cabbages", "broccoli")
pets <- c("cats", "dogs", "fish")
I then have some dummy data:
Date_Range <- seq(as.Date("2017-01-01"), as.Date("2017-01-30"), by = 1),
Sessions <- ceiling(rnorm(90, mean = 3000, sd = 300))
I now want to build a data frame with these. For each of the 30 dates within Date_Range, I would like there to exist one of each of the distinct combinations of fruit, veg and pets.
How can I build by my in such a way?