I want to create a geometria_bar
with the percentages as followed but the bars always add up to 1, but in reality they show different percentages.
Here's a screenshot
Asked
Active
Viewed 28 times
0

Harrison Jones
- 2,256
- 5
- 27
- 34
-
You are plotting your calculated frequency values to the x-axis, but you most likely expect these to be the heights of the bars (y-axis). Try `aes(x = hotel_type, y = freq, fill = hotel_type)` and use `geom_col()`. – Seth May 01 '23 at 12:41
-
1Please don't paste your code as a picture. [How do I ask a good question](https://stackoverflow.com/help/how-to-ask) – Harrison Jones May 01 '23 at 13:34
-
1Please post some sample data as copy/pasteable text (`dput(your_data[1:10, ])` is a great way to share a sample. Also please post your code as text so we can copy/paste it and test it and fix it. – Gregor Thomas May 01 '23 at 13:50