Skip to content

Commit

Permalink
update pivot wider
Browse files Browse the repository at this point in the history
  • Loading branch information
mdancho84 committed Jul 6, 2022
1 parent 26cdbb5 commit c9dba3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion 010_tidyverse_pivot/010_tidyverse_pivot.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ mpg
mpg_pivot_table_1 <- mpg %>%
group_by(manufacturer) %>%
count(class, name = "n") %>%
pivot_wider(names_from = class, values_from = n, values_fill = 0) %>%
pivot_wider(
names_from = class,
values_from = n,
values_fill = 0
) %>%
ungroup()

# 2.0 Pivot Table ----
Expand Down

0 comments on commit c9dba3a

Please sign in to comment.