how to efficiently subset a dataframe into several chunks to be passed to a list of lists
问题 I would appreciate any help to efficiently subset a data frame into several chunks to be passed to a list of lists based on the variable imput . My code below works for a few subsets, but I have 100 subsets to create and the code becomes too much and difficult to handle. Therefore, I need a more efficient approach which accomplishes the same outcome without too much code. The approach imputation_groups <- split(dat, dat$imput) discussed here allows me to split my data into a list of several