@johnmackintosh @danwwilson big fan of targets too 👍
I came across {groupdata2} which allowed me to replace a lot of really janky #rstats code for randomly splitting up datasets into cross validation folds/groups, whilst also taking into consideration additional structural factors in the splits, but also keeping things reasonably even 🦸
https://github.com/ludvigolsen/groupdata2
#PackageLove #WeeklyRShare
GitHub - LudvigOlsen/groupdata2: R-package: Methods for dividing data into groups. Create balanced partitions and cross-validation folds. Perform time series windowing and general grouping and splitting of data. Balance existing groups with up- and downsampling or collapse them to fewer groups.

R-package: Methods for dividing data into groups. Create balanced partitions and cross-validation folds. Perform time series windowing and general grouping and splitting of data. Balance existing g...

GitHub