If I have data that looks like this
| Condition 1 | Condition 2 |
|---|---|
| 11 | 41 |
| 17 | 45 |
where the numeric values are length.
Is there a way to change the data so that it looks like this instead
| Condition | length |
|---|---|
| Condition 1 | 11 |
| Condition 1 | 17 |
| Condition 2 | 41 |
| Condition 2 | 45 |
I've looked at transpose, unite, and pivot_longer. But it seemed like it wouldn't give me the results I was looking for. Does anybody have any suggestions?
dd, you should be able to dotidyr::pivot_longer(dd, everything()). This is just a wide to long transformation.