How can i substitute this code with a loop?
m1 <- ggplot(foo) m2 <- ggplot(foo) ... m9 <- ggplot(foo)
I guess i need something like
Something like this should work:
for (i in 1:9) { name <- paste("m", i, sep="") assign(name, ggplot(foo)) }