You can use split to put each of the subsets of the data into their own dataframe that is stored in a list.
Here's an example
Code:# Look at mtcars, notice there are only a few values for carb mtcars # Split the data based on the value of carb split(mtcars, mtcars$carb)




Reply With Quote

