x <- mtcars[1:3, 1:6]
x |> split_bycol()
x |> split_bycol(as.list=TRUE)
x |> split_bycol(as.list=FALSE)
x |> split_bycol(idx=c(1,1,1,2,2,3,3,3))
## x |> split_bycol(idx=c(1,1,7,2,2,3,3,3)) ## Gives error
x <- mtcars[1:6, 1:6]
x |> split_byrow()
x |> split_byrow(idx=c(1,1,2,2))
m <- as.matrix(x)
u <- x |> split_byrow(idx=c(1,1,2,2))
y <- m |> split_byrow(idx=c(1,1,2,2))
Run the code above in your browser using DataLab