0

I have the following problem in R language:

I would like to reshape my data from a wide format e.g.

id1 time_start time_end   name1  name2
345 jan.3.6:00 jan.4.7:00 Daniel Roland
346 jan.3.6:10 jan.3.6:30 Elen   Roland

to a long format with one data in each second like:

time_in_hours id variablename value
jan.3.6:00 345 name1 Daniel
jan.3.6:00 345 name2 Roland
jan.3.7:00 345 name1 Daniel
jan.3.7:00 345 name2 Roland 

So I need a seq in the given range, and transform the values in a long format. I would like to ask some advice how to do it. Thanks in advance!

Jaap
  • 81,064
  • 34
  • 182
  • 193
user5918250
  • 73
  • 1
  • 1
  • 10
  • 1
    Please format the data and show some real values – akrun Mar 20 '16 at 16:30
  • Thank you, very much for the critic and the edit as well! I will try to improve my questions. And thanks for the solved problem as well (http://stackoverflow.com/questions/2185252/reshaping-data-frame-from-wide-to-long-format). Though I do not think it is a duplicate, I have to generate a sequence for times and not just reshape already existing dates to long format. – user5918250 Mar 20 '16 at 16:56

0 Answers0