I have a question regarding a command. We used in a class runif to create a training set, that should contain 50% of the data set. (we developed a decision tree based on this training set). But I still can't understand the logic behind this command, could someone explain to me how this works?
I understand the decision trees, and the logic behind splitting up a data set, my question is just explicitly about how this command works.
inTrain <- runif(nrow(USArrests)) < 0.5