R/split_tt.R
split_tt.Rd
Split the data into a simple training and testing set
split_tt(x, part)
Pass your data frame or matrix here.
A numeric value between 0 and 1 to represent the proportion of the whole data you want to use as the training set.
x <-as.data.frame(matrix(1:5000,250,20)) x.train <- split_tt(x,.7)$train x.test <- split_tt(x,.7)$test dim(x.train) #> [1] 175 20 dim(x.test) #> [1] 75 20