Having Issues with Bar Graphs

I am trying to create a bar plot. I realized that in order to make the bar plots work, the specific columns from my dataset referred to as Heroin, AnyOpioid and Both has to be found in the rows themselves of my dataset so they can actually show the way I want them to show up. They are instead found as Y, N or N/A in the rows since Heroin, AnyOioid and Both are the title of the columns. This is why I have gotten the bar plots to only show me bars indicating Y, N, or N/A rather than the bars showing specifically for Heroin, AnyOpioid and Both for the accidental drug overdoses. I have tried to create a dataframe to make it work the way I want it to work so my data plot can have the bars indicating Heroin, AnyOpioid and Both. I would like for Y, N, or N/A to show itself as separate bars under the same title which would be for Heroin, AnyOpioid and Both respectively.

Hi!

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:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.