Haven't had much success with googling this one. New R user. Suspect the answer is with reshape/plyr but haven't been able to figure it out.
I have data in this form: sampling interval, recorded value, # times value was recorded
e.g
45.3, 17, 3
48, 19, 2
Doing a histogram of the data, I just get a histogram containing 17, 19. When really my data is 17,17,17,19,19
I can write a loop to go through the times recorded column and create a new data column, but it's awkward and I'm sure I'm over-thinking this.
Is there a simple function to turn this into a data frame that would be:
45.3, 17
45.3, 17
45.3, 17
48, 19
48, 19