79155267

Date: 2024-11-04 11:34:54
Score: 4
Natty: 4
Report link

Because when using pivot_wider, half is used as a key_variable. Afterwards, pivot_longer takes the first column in the pivot_wider result as the first column and the first row as the second column. You can make it work symmetrically by changing the code as follows.

Reasons:
  • Low length (2):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: mrz.duru