BLACK FRIDAY EXTRA SAVINGS EVENT - EXTENDED
START FREE

HELP ME to solve the problem

Screen Link:
https://app.dataquest.io/m/402/working-with-missing-data/5/preparing-data-for-missing-data-visualization

My Code:

library(dplyr)
library(tidyr)

df_heat <- df %>%
  pivot_longer(cols = everything(),
               names_to = "x") %>%
  group_by(x) %>%
  mutate(y = row_number())

print(df_heat)

What I expected to happen:
I did not understand why we need group_by() here. Thanks

What actually happened:

Replace this line with the output/error