I want to plot 3 lines using ggplot2. My data looks like this
print(x)
V1 V2 V3 V4
1 -4800 25195.73 7415.219 7264.28
2 -2800 15195.73 5415.219 7264.28
From this example, I understand that I would need to reshape my data to something like this:
id x y
1 1 -4800 25195.73
2 1 -2800 15195.73
3 2 -4800 7415.219
4 2 -2800 5415.219
5 3 -4800 7264.28
6 3 -2800 7264.28
How do I do this reshaping?
