ab_time_normal {abstr} | R Documentation |
Generate times for A/B scenarios
Description
Generate times for A/B scenarios
Usage
ab_time_normal(hr = 8.5, sd = 0.5, n = 1)
Arguments
hr |
Number representing the hour of day of departure (on average). 8.5, for example represents 08:30. |
sd |
The standard deviation in hours of the distribution |
n |
The number of numbers representing times to return |
Value
An integer representing the time since midnight in seconds
Examples
time_lunch = ab_time_normal(hr = 12.5, sd = 0.25)
time_lunch
# Back to a formal time class
as.POSIXct(trunc(Sys.time(), units="days") + time_lunch)
time_morning = ab_time_normal(hr = 8.5, sd = 0.5)
as.POSIXct(trunc(Sys.time(), units="days") + time_morning)
time_afternoon = ab_time_normal(hr = 17, sd = 0.75)
as.POSIXct(trunc(Sys.time(), units="days") + time_afternoon)
[Package abstr version 0.4.1 Index]