Description Usage Arguments Value Examples
Generate times for A/B scenarios
1 | ab_time_normal(hr = 8.5, sd = 0.5, n = 1)
|
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 |
An integer representing the time since midnight in seconds
1 2 3 4 5 6 7 8 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.