I have multiple data tables that im trying to run the same command for, and sicne i dont want to type each one for every command, I'm trying to loop it. They have the same variables.
say they are named data_2018q1 data_2018q2 data_2019q1 data_2019q2 i want to run
lm(VD4020~V2010+V2007, data = )
for all of them, without having to run multiple lm()but no idea how to.
for reproducible example, use cars:
cars1 = cars cars2 = cars*2 cars3 = cars*3 lm(speed~dist, data= )
for the three of them. Thanks ahead!