So I've been trying for a couple days but I can't seem to figure this out. I am trying to print the max value in a column with the corresponding date.
My theData is in the Following format:
Date Time Value
20130811 9:30 12
20130811 9:31 0
20130811 9:32 1
20130812 9:30 8
20130812 9:31 99
20130812 9:32 12
The following code was suggested to me in an earlier post and works partially:
max <- ddply(theData,.(Date),summarize, High=max(Value))
which yields:
Date Value
20130811 12
20130812 99
I need the code to yield:
Date Time Value
20130811 9:30 12
20130812 9:31 99
Is there a way to do this without using a for loop?
Thanks for any help.