How to partition the training data for model building?

r
model

#1

I have one training data and I want to use that for building a classification model.I want to know that is there any packages in R which helps in partition the training data for building and validation of my model.
For example I want to partition my training data so that I can use 60% of my data for training the model and remaining 40% for validation of my model.


#2

Hi
this package can help u write ur code like this:
library(caTools)
set.seed(88)
split=sample.split(df,SplitRatio = 0.6)
train=subset(df,split==T)
test=subset(df,split==F)