seankross / mario

🍄 But our princess is in another castle!
Other
21 stars 1 forks source link

how to color groups? #38

Closed seankross closed 2 years ago

seankross commented 2 years ago
library(dplyr)

mt <- mtcars %>%
  as_tibble() %>%
  filter(cyl < 8) %>%
  select(mpg, cyl, am) %>%
  arrange(cyl, am) %>%
  slice(1, 2, 5, 12, 17, 18)

mt %>%
  group_by(cyl) %>%
  group_by(am)
seankross commented 2 years ago

Maybe:

seankross commented 2 years ago
library(dplyr)

mt <- mtcars %>%
  as_tibble() %>%
  filter(cyl < 8) %>%
  select(mpg, cyl, am) %>%
  arrange(cyl, am) %>%
  slice(1, 2, 5, 12, 17, 18) %>%
  slice(1, 5)

mt %>%
  group_by(cyl) %>%
  group_by(am) %>%
  group_by(cyl, am)
pgbovine commented 2 years ago

looks good for now!