Reshaping when there are multiple values per row value

Viewed 8

How can I do the following using R?

Current state | Identifier | Question | Response | -------- | -------------- | ---------- | 1 | Color | Blue | 1 | Color | Green | 1 | Food | Beans | 1 | Food | Corn dog | 2 | Color | Magenta | 2 | Color | Purple | 2 | Food | Pizza | 2 | Food | Macaroni

Future state | Identifier | Color | Food | -------- | -------------- | ---------- | 1 | Blue | Beans | 1 | Green | Corn dog | 2 | Magenta | Pizza | 2 | Purple | Macaroni

0 Answers
Related