I am working in R. My data set has a column of times (hh:mm:ss). The column is listed as factors.
Ultimately, I would like to be able to get the diff() between the values in this column (that is, the difference between time1 and time2 in the same column). I can't do that with factors.
How would I convert the times to another form that will allow me to calculate the difference in times within the same column? Any help would be really appreciated!!
hms()
fromlubridate
and thendifftime()
.times
function from thechron
package. You should already have it installed.