I have a dataframe with 30 columns and I would like to create 30 (gg)plots based on these columns. When creating a plot through ggplot, you have to create a variable to which all the information of the plot is added.
Is there a way how I can create 30 of such variable names in a for loop (so that I don't have to create and store them all locally?
In earlier code I repeated the below steps 30 times:
In earlier code, I had the following:
a1 = ggplot(data = results_round_one,
            aes(results_round_one$`R-0,01`)) 
a1 = a1 + geom_histogram()
a1 = a1 + xlim(0.46, 0.55)
a1 = a1 + geom_vline(xintercept= mean(results_round_one$`R-0,01`),
                     col = 'blue')
a1 = a1 + geom_vline(xintercept = max(results_round_one$`R-0,01`),
                     col = 'red')
a1= a1 + labs(y = 'Frequency', 
              x= 'Validated accuracy', 
              title = 'Optimizer = RMSProp', 
              subtitle = 'Learning rate = 0.01')
However, since I only have to change the aes and the labels, I think I should be able to do this process in a for loop as well.
 
     
    