Data split function by colum

split_col_data(x, sections = 1)

Arguments

x

Data.frame or data.table object that need to be divided n sections by colum

sections

Split section number (colnum)

Examples

x1 <- data.frame(col1 = 1:10, col2 = 11:20) x1.t <- t(x1) x <- split_col_data(x1.t, sections = 3)