I have an example data frame:
df <- data.frame(x = 1:112, y = runif(112))
Is there a way to print a list of data frames with the first
This can be solved with nesting using tidyr/dplyr
require(dplyr) require(tidyr) num_groups = 10 iris %>% group_by((row_number()-1) %/% (n()/num_groups)) %>% nest %>% pull(data)