Here is a simple loop
for (i in seq(1,30)) {
mdl<-i
}
How do I get 30 mdl rather than just one mdl (which is happening because within the loop, mdli is being replaced by mdli+1 at every iteration. What I want is to have 30 mdl perhaps with names like mdl1, mdl2 ....mdl30
I tried this:
for (i in seq(1,30)) {
mdli<-i
}
But if I type mdl1, it says mdl1 not found whereas typing mdli gives me the value of i=5
Thank you