I am looking to do the following task in R. The current table view and expected table view are given below:
- Current Table view:
Name | Date 1 | Date 2 | Date 3 |
---|---|---|---|
Name1 | v1 | v2 | v3 |
Name2 | v4 | v5 | v6 |
Name3 | v7 | v8 | v9 |
- The expected Table view:
Name | Date | Value |
---|---|---|
Name1 | Date 1 | v1 |
Name1 | Date 2 | v2 |
Name1 | Date 3 | v3 |
Name2 | Date 1 | v4 |
Name2 | Date 2 | v5 |
Name2 | Date 3 | v6 |
Name3 | Date 1 | v7 |
Name3 | Date 2 | v8 |
Name3 | Date 3 | v9 |
Is there a way to accomplish this task in R. Perhaps using dplyr or another method please?
I hope my question is clear
Thank you very much for the help, Kind Regards, Deshan