I'm using R to loop through a data frame, perform a calculation and to make a plot.
for(i in 2 : 15){
# get data
dataframe[,i]
# do analysis
# make plot
a <- plot()
}
Is there a way that I can make the plot object name 'a', using the value of 'i'? For example, a + "i" <- plot(). Then I want to add that to a vector so I have a series of plots that I can then use at a later stage when I want to make a pdf. Or perhaps there is another way of storing this.
I'm familiar with the paste() function but I haven't figured out how to define an object using it.