Spliting training data into multiple variables using R
You didn't explained how is your dataset and its variables, so I'll put a generic example.

Let's say your dataset has a variable called SET, whose content is TRN for training and TST for test. To create a dataset containing only training set you have to use the following code:

trn.ds&lt;- ds[ds$SET == 'TRN',]

If you need a test dataset, just adapt the code:

tst.ds&lt;- ds[ds$SET == 'TST']

PS: It wasn't me who downvoted your question, I don't understand why people downvote almost every question here.