How can I show the three values of "disp" for a particular cylinder? Only one column is getting displayed. I am expecting three columns for each cylinder. Any suggestions?
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(ggplot2)
mtcars %>% arrange(desc(disp)) %>% group_by(cyl) %>% slice_head(n = 3) %>%
ggplot(aes(cyl, disp)) geom_col() facet_wrap(. ~ cyl)