How do I pivot (longer) Excel data with multiple header in R (Tidyr)

Viewed 12

I am trying to automate my analysis with Shiny but my source data in Excel comes in multiple headers as shown in the picture. How do I pivot this data to get it tidy in R with the Tidyverse? I have tried pivoting longer but I could do that only if the header is one row and not multiple rows headers. Unpivoting in Power Query is a bit similar to what I want to achieve in R Tidy. Multiple header sample data

0 Answers
Related