Split data into train and test sets
Arguments
- data
A data frame
- prop
Proportion for training set (default: 0.8)
- stratify
Column name for stratified splitting. Each stratum is split at
prop. A numeric column with more than five distinct values is stratified by its quartiles, and rows missing the value form a stratum of their own. A stratum of a single row goes to the training set, unless such strata together hold more than a tenth of the rows, as in an ID column; then they are pooled into one stratum and split together.- seed
Random seed for reproducibility
