I\'ve just started using R and I\'m not sure how to incorporate my dataset with the following sample code:
sample(x, size, replace = FALSE, prob = NULL)
I will split 'a' into train(70%) and test(30%)
a # original data frame library(dplyr) train<-sample_frac(a, 0.7) sid<-as.numeric(rownames(train)) # because rownames() returns character test<-a[-sid,]
done