I have a question on converting time in R.
- First, I need to convert the times stored as characters into numerical. Times are stored as start times in one column, and finish times in another. For example: Work start time: 09:00 and work finish time: 17:00.
- I then want to be able to calculate the time in between these times (i.e. the hours) for multiple rows of data by using a function. I.e. how many hours does someone work on an average day?
- Finally, I want to compare early start times and early finish times to late start times and late finish times. For example, by assigning a category to these times. For example, someone who started work before 10:00 would be classified as "early starter" in one column, someone who started after 10:00 would be classified as "late starter" in another, and then someone who finished work before 17:00 would be classified as "early finisher" in one column, and then someone who finished work after 17:00 would be classified as "late finisher" in another column. Is there a way for R to recognise times in this way, when you don't have a date to assign it to?
All the advice I have read so far seems to be geared towards a particular time within a date. E.g. DD/MM/YY HH:MM. I am only concerned with a daily time.
Thanks in advance.