Randomly partition a dataset into a training set and a test set.
a dataset for splitting.
the proportion of observations to be designated to the training set.
Returns a list containing the training set and test set.
This function is not designed to be called directly,
but acts within