Skip to content
Prev 280103 / 398506 Next

Creating appropriate time axis for data

2011/12/12 Uwe Ligges <ligges at statistik.tu-dortmund.de>:
Sorry for the double post but the first message was held for so long
that I figured there was a problem with the email address I was using
so I unsubscribed that one and resubscribed the other one.
The time_to_sec() function is inside the database (in this case
MySQL).  I'm using it solely because R doesn't want to deal with the
times as normally outputted (HH:MM:SS) because it sees them as a
character object and not a numerical or time object.  By converting
these time fields to seconds when I export them from the database I
provide something that R can work with natively apparently.
Does this method supercede  the original y-axis label or supplement
it?  Will the data be correctly located along the y-axis if it's in
seconds?

I thought I had looked at strptime() and it required day/date info to
be listed not just time.  Based on your example I'm assuming that I
was incorrect in that assumption.

Thanks for this suggestion I'll give it a try with my data and see if
it does what I'd like it to do.  I appreciate the help.
-Tony