I have a dataset that I need to split into a training and test set in R. It has many observations, and each have a value for their respective time (Q32008, Q42008,...,Q42016).
I want to split the dataset in half, using randomized quarters, where all observations for a specific quarter are together. For example, one dataset would have all observations from Q2 2009, Q4 2010, Q1 2008. I tried using split
, but I could not unsplit
it randomly, into 2 unique datasets.
Any ideas?