title: How to implement a hold-out validation in R
body: <p>Let's say I'm using the <code>Sonar</code> data and I'd like to make a hold-out validation in R. I partitioned the data using the <code>createFolds</code> from <code>caret</code> package as <code>folds &lt;- createFolds(mydata$Class, k=5)</code>.</p>
  <p>I would like then to use exactly the fold <code>mydata[i]</code> as test data and train a classifier using <code>mydata[-i]</code> as train data.</p>
  <p>My first thought was to use the <code>train</code> function, but I couldn't find any support for hold-out validation. Am I missing something here?</p>
  <p>Also, I'd like to be able to use exactly the pre-defined folds as parameter, instead of letting the function partition the data. Does anyone have any thoughts?</p>