How to transform nested data from long format to wide format without using nested structure?
I have a big dataset and have data in long format (‘longdf’) with one column for subjectnr., one for illness (e.g., rows are epilepsy, ms, diabetes etc.) and other columns for the variables (sociability, morality, competence, several stigma dimensions).