r – Attempt to create sets of data frames from the levels of a factor column with a loop function

My dataset includes educational data for each state, by year. I would like to create a loop that creates data frames for each state containing all the columns of the original dataset. 1992_ALABAMA is an example of a primary key. I would like to have a data framework for Alabama combining all the years and repeat it for each state without having to create each data frame manually.

I've tried creating a loop taking all the levels of the condition factor column and assigning the appropriate rows to that specific factor with each column.

alabama <- data[which(data$STATE == "ALABAMA"),]
for (i in stLevels) {
i <- data[which(data$STATE == i),]

}

I hope 80 frames of data named by their appropriate state, which contain all observations of that state. In reality, a data frame named "i" is created. It contains all the lines containing Wyoming. He did not name it correctly, and that did not happen for any of the other states.