The goal is to make a single ordered logistic regression using multiple data frames with the same structure.

In the example below I joined two data frames to be able to do a single ordered logistic regression. However, I would like a solution that automates the process, since there are 417 data frames.

```
library(dplyr)
library(MASS)

#dataframe 1
party <- factor(rep(c("Rep","Dem"), c(407, 428)), 
                levels=c("Rep","Dem"))  
rpi <- c(30, 46, 148, 84, 99) # cell counts
dpi <- c(80, 81, 171, 41, 55) # cell counts
ideology <- c("Very Liberal","Slightly Liberal","Moderate","Slightly Conservative","Very Conservative")
pol.ideology <- factor(c(rep(ideology, rpi), 
                         rep(ideology, dpi)), levels = ideology)
data1 <- data.frame(party,pol.ideology)

#dataframe 2
party <- factor(rep(c("Rep","Dem"), c(410, 430)), 
                levels=c("Rep","Dem"))  
rpi2 <- c(26, 50, 140, 95, 99) # cell counts
dpi2 <- c(75, 86, 141, 61, 67) # cell counts
ideology2 <- c("Very Liberal","Slightly Liberal","Moderate","Slightly Conservative","Very Conservative")
pol.ideology <- factor(c(rep(ideology2, rpi2), 
                         rep(ideology2, dpi2)), levels = ideology2)
data2 <- data.frame(party,pol.ideology)

nrow(data1)
nrow(data2)

## Joining dataframes "manually"
dat <- bind_rows(data1,data2)

table(dat)
nrow(dat)

# fit proportional odds model

pom <- polr(pol.ideology ~ party, data=dat)
summary(pom)

```

So I tried to loop in an attempt to do a single regression with data1 and date2. I was not successful, as the regression considers only data2.

```
## LOOP
data = ls(pattern="data")
for(i in 1:length(ls(pattern="data"))){
  pom <- polr(pol.ideology ~ party, data=i)  
}
summary(pom)

```

Could someone point me to a solution? I recently started studying the loop theme on R. Sorry if the question is silly.