I have two character variables in my dataframe start_time
and stop_time
:
start_time stop_time
<chr> <chr>
1 19:5:00 19:11:00
2 20:33:37 20:34:39
3 20:23:00 20:23:38
4 20:12:00 20:13:00
5 20:00:39 20:00:39
I would like to calculate the difference between start_time
and stop_time
in terms of minutes with dplyr. My problem is that the two variables are expressed as a character.
expected output:
diff_time
<dbl>
1 6
2 1.2
3 0.38
4 1
5 0.39