title: How to split data in R by particular criteria?
body: <p>I have a data set with 3 columns, one with Unique code for people, another with age groups, another with which Branch they are signed up at.</p>
  <p>How do I then split this data into 2 groups where both groups have the same distribution of age as well as the same distribution of Branch they are signed up at (both groups should have roughly equal % of different age group and different Branches as well).</p>
  <p>Is there a way to do this more accurately and not group by age group at all?</p>
  <p>Thanks!</p>