Beginner R programmer. I have the following data table & code:
hockeyviz <- quanthockey3 %>%
mutate(Name = fct_reorder(Name, A+G)) %>%
ggplot(aes(x=A+G, y=Name, fill = test)) + geom_col(color="black", fill="lightblue") +
labs(title="Top 10 NHL Point Totals", x="Points", y="Player Name")
I am trying to create a stacked bar graph utilizing goals and assists, however I cannot understand how to go about this when dealing with two numerical columns as opposed to two categorical values. I have researched this relentlessly but cannot find any examples or help.
Any help on this matter is greatly appreciated along with code structure advice. Thank you!