filter with loop to create new dataframes

Hello ,

i have a dataframe with about 4k rows and 16 columns.
I want to filter about 500 specific cases with all 16 columns into a new dataframe each (so that I have about 500 dataframes after)

I already was able to filter a few cases with the filter function of dplyr.

I really don't want to write every 500 commands into the console by myself, so is there a chance to code a command that R automatically adds 1 to the new dataframe and the case I want to filter by itself and so creates the 500 dataframes on its own?

Thanks in advance!


To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.