Keep the same "table of cut values" example (#571)
* Keep the same "table of cut values" example No need to go with imaginary values when there is a nice example that is used before and after this example. * indent and remove extra comma
This commit is contained in:
parent
aa0d1ea938
commit
f538fc7356
|
@ -500,14 +500,16 @@ This works because every geom has a default stat; and every stat has a default g
|
||||||
|
|
||||||
```{r, warning = FALSE}
|
```{r, warning = FALSE}
|
||||||
demo <- tribble(
|
demo <- tribble(
|
||||||
~a, ~b,
|
~cut, ~freq,
|
||||||
"bar_1", 20,
|
"Fair", 1610,
|
||||||
"bar_2", 30,
|
"Good", 4906,
|
||||||
"bar_3", 40
|
"Very Good", 12082,
|
||||||
|
"Premium", 13791,
|
||||||
|
"Ideal", 21551
|
||||||
)
|
)
|
||||||
|
|
||||||
ggplot(data = demo) +
|
ggplot(data = demo) +
|
||||||
geom_bar(mapping = aes(x = a, y = b), stat = "identity")
|
geom_bar(mapping = aes(x = cut, y = freq), stat = "identity")
|
||||||
```
|
```
|
||||||
|
|
||||||
(Don't worry that you haven't seen `<-` or `tribble()` before. You might be
|
(Don't worry that you haven't seen `<-` or `tribble()` before. You might be
|
||||||
|
|
Loading…
Reference in New Issue