0

I want to add several data frames to a list. The data frames are called MAT_STATION_DUM_1988, MAT_STATION_DUM_1989, MAT_STATION_DUM_1990, ..., etc. As you can see, in the name of the data frames only changes the last part which corresponds to each year. How can I make a loop that takes all these data frames with the same name until the last part of the string and add them to a list?

I am currently doing in this way

listDF <- list(MAT_STATION_DUM_1988, MAT_STATION_DUM_1989)
temp <- lapply(listDF)

but, I do not want to add them manually in the listDF, if not doing it with a loop. any ideas?

Ronak Shah
  • 286,338
  • 16
  • 97
  • 143
Sss
  • 373
  • 1
  • 7

0 Answers0