Running the error message through translate, it says Error in scale (test_set): Object 'test_set' not found
This is strange, since you seem to create test_set earlier in the code.
Could you please turn this into a self-contained reprex (short for reproducible example)? It will help us help you if we can be sure we're all working with/looking at the same stuff.
There's also a nice FAQ on how to do a minimal reprex for beginners, below:
What to do if you run into clipboard problems
If you run into problems with access to your clipboard, you can specify an outfile for the reprex, and then copy and paste the contents into the forum.
Fehler in sample.split(dataset$DependentVariable, SplitRatio = 0.8) :
Error in sample.split: 'SplitRatio' parameter has to be i [0, 1] range or [1, length(Y)] range
training_set = subset(dataset, split == TRUE)
Fehler in split == TRUE :
Vergleich (1) ist nur für atomare und Listentypen möglich
Please post a reproducible example as requested above by Mara. It is very difficult to debug code without data and the full actual code. Here is a reproducible example of the type of thing you are trying to do that works for me.