'How to apply a function to multiple datasets

I have 12 datasets with the same format, but with different dates. their names are abc202101, abc202102, ..., abc202112 I want to make the same changes in all of them, without having to repeat the procedure in each of them.

Help please

# eliminate unnecessary columns  
abcyyyymm <- abcyyymm [ c(4:nrow(abcyyyymm)), ]

#take the first line for titles
names(abcyyyymm)<-unlist(abcyyyymm[1,])

#eliminate first line, after having it already in titles
abcyyyymm <- abcyyyymm[ c(2:nrow(abcyyyymm)), ]


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source