I have a list of several data.frames:
my_list <- list(d1, d2, d3,...)
Each of the data.frames looks the same, resulting in a list structure like:
my_list
d1
Temp
Inc.Time
Day
Value
lowlim
uplim
d2 (same)
d3 (same)
I would like to plot my Data, one plot for each data.frame in the list, with the name of the df (e.g. d1) as title of the plot.
The code I would use for one dataframe at a time would be:
ForPlot <- ggplot(d1, aes(Inc.Time, Value), fill=Inc.Time, width=.7)
ForPlot +
geom_hline(yintercept = c(0, 0.25, 0.5, 0.75, 1.0), colour= "lightgrey" )+
geom_col( aes(fill=Inc.Time, group=Day),
position=position_dodge2(preserve="single"))+
ylab("Relative Values") + xlab("Day") +
ggtitle("d1")+
facet_wrap(~Temperature, scales= "free", ncol=3)+
scale_y_continuous(breaks=c(0,0.25,0.5,0.75,1),labels=c(0,0.25,0.5,0.75,1),limits=c(0,1.05))+
geom_text(aes(label = Day), position=position_dodge2(width= 0.9),
y=-0.025, size=2.3)+
geom_errorbar(aes(ymin=pmax(0,lowlim), ymax=uplim),
position=position_dodge2())
Any ideas on how to run this on my list? Thank in advance! :)