79400366

Date: 2025-01-30 15:26:43
Score: 0.5
Natty:
Report link

With your data assigned to df, you can do the following to get to your desired structure:

library(tidyverse)
df %>% ungroup() %>%
  pivot_wider(values_from = n, names_from = matt_ne) %>% 
  column_to_rownames("health_pa")

Created on 2025-01-30 with reprex v2.1.1

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: maike