I've got a barplot and I coded it to keep a space for the categories with a 0% value. I also added a code to display the labels for the values (in %). However, this does not work for my categories with a 0% value.
Hello.
Thanks for providing code , but you could take further steps to make it more convenient for other forum users to help you.
Share some representative data that will enable your code to run and show the problematic behaviour.
You might use tools such as the library datapasta, or the base function dput() to share a portion of data in code form, i.e. that can be copied from forum and pasted to R session.
I created a random variable so anyone can see how the graph looks like.
So I get a space for the value "c" on my bar chart but I would like to add a 0%. Please note that this code will be included in a function to automatically generate graphs so I would like to avoid adding "0%" manually.