int_mean | R Documentation |
Interval
objectint_mean()
computes the mean of an Interval
object.
int_mean(int)
int |
An |
An Interval
vector.
Other Interval functions:
int_duration()
,
int_overlap()
lubridate::interval(
lubridate::ymd_hms("2023-01-01 22:00:01", tz = "UTC"),
lubridate::ymd_hms("2023-01-02 02:00:01", tz = "UTC"),
tzone = "UTC"
) |>
int_mean()
#> [1] "2023-01-02 00:00:01 UTC" # Expected
c(
lubridate::interval(
lubridate::ymd_hms("2023-01-01 22:00:01", tz = "UTC"),
lubridate::ymd_hms("2023-01-02 02:00:01", tz = "UTC"),
tzone = "UTC"
),
lubridate::interval(
lubridate::ymd_hms("1990-01-01 06:00:00", tz = "UTC"),
lubridate::ymd_hms("1990-01-01 12:00:00", tz = "UTC"),
tzone = "UTC"
)
) |>
int_mean()
#> [1] "2023-01-02 00:00:01 UTC" "1990-01-01 09:00:00 UTC" # Expected
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.