Came across this brilliant #rstats package {groupdata2} for dividing data into groups.
The function I’m most appreciative of is collapse_groups() which allows you to divide already grouped data into another set of groups whilst retaining the original.
Super handy when working with kfold CV and you want to split your data but there are structural elements you don’t want shared across groups, to prevent inflation of predictive abilities.
https://github.com/ludvigolsen/groupdata2
#MachineLearning #GenomicSelection