Im new with R and am struggling a bit, but refuse to use minitab or excel as I want to learn R. I have a data set in excel that has dates and time in one column and process steps in another. I want to calculate the total time the process was in a specific step number, but can't figure it out. In the example below, how would I calculate the total time the process was in step 500?
Thanks. I already had libridate installed. Not sure if this correct.
leave <- ymd_hms("2018-12-19 09:49:25", tz = "America/Chicago")
#> Error in ymd_hms("2018-12-19 09:49:25", tz = "America/Chicago"): could not find function "ymd_hms"
class(leave)
#> Error in eval(expr, envir, enclos): object 'leave' not found
Sure that you had lubridate loaded? In R there are some packages that are always available by default, but most you have to get in your workspace explicitly
got it to work this time. Now I just need to get time durations when process step 50 is used.
library(lubridate)
#>
#> Attaching package: 'lubridate'
#> The following object is masked from 'package:base':
#>
#> date
leave <- ymd_hms("2018-12-19 09:49:25", tz = "America/Chicago")
I gave up for now. I went back to the basics just trying to understand the basics. I can't figure out how to calculate duration between two date/time entries.