createDataPartion generates blank Test set

Hi,

Welcome to the RStudio community!

The code you provided does not contain any data that we can run, so it's not possible for us to recreate the issue. If you like to get better help, I suggest you create a reprex next time. A reprex consists of the minimal code and data needed to recreate the issue/question you're having. You can find instructions how to build and share one here:

Judging by the code, I have one question/suggestion: what is this Vrate? The code is splitting based on the transformed_NY1A$Vrate value, and depending on its class and value this might lead to unexpected results. Can you show me a sample of the data you have (see the reprex guide).

Grtz,
PJ