Let's start with an example, for instance, the iris
dataset (data(iris)
).
The column Species
is composed by three factors: setosa
, versicolor
and virginica
.
I would like to subset or filter all these factors by creating, for instance, three dataframes, each corresponding to one factor. Later on, I would like to work with all of them iteratively.
I have been checking different options, but all of them focused on filtering one or two factors, not taking all of them into consideration to operate over them separately and iteratively later.