I have been learning R for quite some time now but i still need guidance in it. I have these two tables that i want to draw a stacked bar chart for but excel isnt helping me that much and it looks awful in it, so any help or guidance would be appreciated
I have seen this but im still puzzled on how to combine the common elements between the two tables, or will the code combine it by itself?
thanks for your help
To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:
You've given no context how your tables relate; or how the difference between them should be understood.
I would guess there should be a column in each, with a label ; so that if the two sets were vertically stacked their origin table would be known (as that is relevant to your analysis some how ?)
bind_rows has an
.id param thats useful for that.
library(dplyr) (one <- starwars[1:4, ]) (two <- starwars[9:12, ]) bind_rows(list(one, two), .id = "id")
I use the similar rows and columns but with different numbers thats what i mean
thats how it looks like but i want a decent understandable one
yeah, so bind_rows like I said.
probably not putting numbers all over it would be one easy change to make; but opinions vary.