View source: R/calc_time_between.R
calc_time_between | R Documentation |
Finds the difference between two timestamps.
calc_time_between( dataset, begining_time, end_time, new_name = "time_diff", unitx = "days" )
dataset |
The dataset you are working with. |
begining_time |
POSIXct variable that denotes the start of the time interval. |
end_time |
POSIXct variable that that denotes the end of the time interval. |
new_name |
Character variable that indicates what you want to the time difference variable to be called. |
unitx |
Character variable that indicates what units to return time difference, default is days. |
Gives a dataset with a new column consisting of the difference between two time periods
## Not run: data <- data %>% calc_time_between(culture_start, culture_end, unitx = "days") data <- calc_time_between(data, lactate_start, lactate_end, unitx = "hours") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.