Entering edit mode
10.4 years ago
Parham
★
1.6k
Hi, does anybody know why my R plots graphs without the bar?
I also get the following error:
Error : Mapping a variable to y and also using stat="bin".
With stat="bin", it will attempt to set the y value to the count of cases in each group.
This can result in unexpected behavior and will not be allowed in a future version of ggplot2.
If you want y to represent counts of cases, use stat="bin" and don't map a variable to y
If you want y to represent values in the data, use stat="identity".
See ?geom_bar for examples. (Defunct; last used in version 0.9.2)
To get a better answer, you should provide the code that is throwing this error. In this case it seems like the error message is telling you what to do: read ?geom_bar and decide if stat should be identity or bin (in which case you shouldn't set a y-value)