I'm attempting to reshape the AirPassengers dataset on R from wide to long.
data(AirPassengers)
melt(AirPassengers)
The issue I am encountering is that 'melt' keeps the value of the AirPassengers data but I need the corresponding time information alongside the output of melt(AirPassengers).
What is the best method to reshape time series data while keeping a time column?
Thank you!