Hi @Emile_Bosman, welcome to RStudio Community.
caTools::sample.split() works fine for me on the iris data set. Would you mind posting a reproducible example?
caTools::sample.split()
iris