rand_dtm.Rd
Generates random datetimes that are, elementwise, between start
and end
pct_orig secs_per_year secs_per_day rand_posixct( start, end, max_duration_secs = NULL, multiplier = if (is(start, "Date")) secs_per_day else 1, n = max(length(start), length(end)) )
start | POSIXct or Date. Earliest possible datetime for thte sample |
---|---|
end | POSIXct or Date. latest possible datetime for thte sample |
max_duration_secs | numeric. Number of seconds to use to generate alernate end if |
multiplier | numeric. Used internally. |
n | numeric. Length of sample. Default to max of |
An object of class character
of length 1.
An object of class numeric
of length 1.
An object of class numeric
of length 1.
A POSIXct
vector of datetimes.
rand_posixct("2020-01-01", "2021-01-01", n = 2)#> [1] "2020-01-30 13:18:33 UTC" "2020-11-01 08:46:53 UTC"#> [1] "1998-04-02 14:09:48 UTC" "2000-01-05 13:25:01 UTC"