I got a dataset that looks like this
a b c d
x 1.1 lol xyz
x 1.4 lal xyw
y 1.2 lel xyz
x 1.4 lol xyw
y 1.8 lel xyz
I get my plot with ggplot(filter(df, c=="lol"), aes(x=b)) + geom_bar() + facet_wrap( ~ d) + xlab("xlab") + ylab ("ylab")
.
I am trying to plot this for every c factor with a for loop, but I am not sure how to do this.