with a dataframe like below
> set.seed(99)
> data = data.frame(name=c("toyota", "nissan"), a=sample(1:10,2)/10,b=sample(-150:-50,2),c=sample(1e2:1e3,2),d=sample(1e3:1e5,2), e=sample(-15:30,2))
> data
name a b c d e
1 toyota 0.6 -81 582 67471 -7
2 nissan 0.2 -51 969 30163 13
I need to create a bar chart of each of the columns a to e. I could do it individually as ggplot(data, aes(x=name, y=a)) + geom_bar(stat = "identity")
which is fine. However I need to bring all these plots into a single chart may be with two columns in an iterative fashion - how to go about this ?
Update 1:-
To add clarity on the question it doesn't make sense to create a single stacked bar chart as the range of the values for each column vary a lot. A simple stacked bar chart as in the answer here would generate a plot like below - which isn't useful for representing some of the variables
Update 2:-
with suggestion to use facet_grid(~ variable, scales = "free")
doesn't make this any better - see chart below.