vec_split(mtcars$cyl, mtcars$vs)
vec_split(mtcars$cyl, mtcars[c("vs", "am")])
if (require("tibble")) {
as_tibble(vec_split(mtcars$cyl, mtcars[c("vs", "am")]))
as_tibble(vec_split(mtcars, mtcars[c("vs", "am")]))
}
Run the code above in your browser using DataLab