Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#Splitting the data set into train and test
set.seed(2)
part <- sample(2, nrow(data), replace = TRUE, prob = c(0.7, 0.3))
train<- data[part == 1,]
test<- data[part == 2,]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment