# NOT RUN {
# load German credit data
data(germancredit)
# Example I
dt_list = split_df(germancredit, y="creditability")
train = dt_list[[1]]
test = dt_list[[2]]
# dimensions of train and test datasets
lapply(dt_list, dim)
# Example II
dt_list2 = split_df(germancredit, y="creditability", ratio = c(0.5, 0.2))
lapply(dt_list2, dim)
# }
Run the code above in your browser using DataLab