1

I have the following data (dt.prediction):

    Time                                         Prediction
 1 02.01.2015 01:00 - 02.01.2015 02:00 (CET)     10984
 2 02.01.2015 02:00 - 02.01.2015 03:00 (CET)     10600
 3 02.01.2015 03:00 - 02.01.2015 04:00 (CET)     9900
 4 02.01.2015 04:00 - 02.01.2015 05:00 (CET)     9857
 5 02.01.2015 05:00 - 02.01.2015 06:00 (CET)     10615

Now I need to copy each row 4 times. I tried

 rbind(dt.prediction, dt.prediction, dt.prediction, dt.prediction)
 dt.prediction[order(Time)

But because the time is all these values in one column it doesn't work. If I order it 2016 is at the bottom and the top while there is 2015-2017 in my dataset. Is there a way to order it the right way? Or do I need somehow to split the time column in to more columns or something?

Thanks!

Max
  • 31
  • 1
  • 6

0 Answers0