Description Usage Arguments Value Examples
sim_wday() returns the weekday of a sim_datetime. It's crucial to use the same origin_date for sim_wday() than the origin_date that was used to generate the sim_datetime. sim_wday() uses the base R format(x, "%u") function.
1 | sim_wday(sim_datetime, origin_date)
|
sim_datetime |
A sim_datetime (integer representing the passed seconds since origin_date) |
origin_date |
A datetime (POSIXt) |
A character, giving the weekday number ("1" = Monday, "2" = Tuesday, ..., "7" = Sunday)
1 2 3 4 | origin_date <- as.POSIXct("2016-01-01 00:00:00", tz = "UTC")
sim_wday(60, origin_date)
sim_wday(3600,origin_date)
sim_wday(36*3600,origin_date)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.