Skip to contents

This function creates a data frame of durations.

Usage

create_durations(duration_length, ...)

Arguments

duration_length

The length of each duration.

...

Additional arguments passed to or from other methods.

Value

A durations object.

Examples

# Create durations of 1 hour
create_durations("1 hour")
#>         id                                         duration
#> 1  ti_0001 2024-10-20 00:00:00 UTC--2024-10-20 00:59:59 UTC
#> 2  ti_0002 2024-10-20 01:00:00 UTC--2024-10-20 01:59:59 UTC
#> 3  ti_0003 2024-10-20 02:00:00 UTC--2024-10-20 02:59:59 UTC
#> 4  ti_0004 2024-10-20 03:00:00 UTC--2024-10-20 03:59:59 UTC
#> 5  ti_0005 2024-10-20 04:00:00 UTC--2024-10-20 04:59:59 UTC
#> 6  ti_0006 2024-10-20 05:00:00 UTC--2024-10-20 05:59:59 UTC
#> 7  ti_0007 2024-10-20 06:00:00 UTC--2024-10-20 06:59:59 UTC
#> 8  ti_0008 2024-10-20 07:00:00 UTC--2024-10-20 07:59:59 UTC
#> 9  ti_0009 2024-10-20 08:00:00 UTC--2024-10-20 08:59:59 UTC
#> 10 ti_000a 2024-10-20 09:00:00 UTC--2024-10-20 09:59:59 UTC
#> 11 ti_000b 2024-10-20 10:00:00 UTC--2024-10-20 10:59:59 UTC
#> 12 ti_000c 2024-10-20 11:00:00 UTC--2024-10-20 11:59:59 UTC
#> 13 ti_000d 2024-10-20 12:00:00 UTC--2024-10-20 12:59:59 UTC
#> 14 ti_000e 2024-10-20 13:00:00 UTC--2024-10-20 13:59:59 UTC
#> 15 ti_000f 2024-10-20 14:00:00 UTC--2024-10-20 14:59:59 UTC
#> 16 ti_0010 2024-10-20 15:00:00 UTC--2024-10-20 15:59:59 UTC
#> 17 ti_0011 2024-10-20 16:00:00 UTC--2024-10-20 16:59:59 UTC
#> 18 ti_0012 2024-10-20 17:00:00 UTC--2024-10-20 17:59:59 UTC
#> 19 ti_0013 2024-10-20 18:00:00 UTC--2024-10-20 18:59:59 UTC
#> 20 ti_0014 2024-10-20 19:00:00 UTC--2024-10-20 19:59:59 UTC
#> 21 ti_0015 2024-10-20 20:00:00 UTC--2024-10-20 20:59:59 UTC
#> 22 ti_0016 2024-10-20 21:00:00 UTC--2024-10-20 21:59:59 UTC
#> 23 ti_0017 2024-10-20 22:00:00 UTC--2024-10-20 22:59:59 UTC
#> 24 ti_0018 2024-10-20 23:00:00 UTC--2024-10-20 23:59:59 UTC

# Create durations of 30 minutes
create_durations("30 minutes")
#>         id                                         duration
#> 1  ti_0001 2024-10-20 00:00:00 UTC--2024-10-20 00:29:59 UTC
#> 2  ti_0002 2024-10-20 00:30:00 UTC--2024-10-20 00:59:59 UTC
#> 3  ti_0003 2024-10-20 01:00:00 UTC--2024-10-20 01:29:59 UTC
#> 4  ti_0004 2024-10-20 01:30:00 UTC--2024-10-20 01:59:59 UTC
#> 5  ti_0005 2024-10-20 02:00:00 UTC--2024-10-20 02:29:59 UTC
#> 6  ti_0006 2024-10-20 02:30:00 UTC--2024-10-20 02:59:59 UTC
#> 7  ti_0007 2024-10-20 03:00:00 UTC--2024-10-20 03:29:59 UTC
#> 8  ti_0008 2024-10-20 03:30:00 UTC--2024-10-20 03:59:59 UTC
#> 9  ti_0009 2024-10-20 04:00:00 UTC--2024-10-20 04:29:59 UTC
#> 10 ti_000a 2024-10-20 04:30:00 UTC--2024-10-20 04:59:59 UTC
#> 11 ti_000b 2024-10-20 05:00:00 UTC--2024-10-20 05:29:59 UTC
#> 12 ti_000c 2024-10-20 05:30:00 UTC--2024-10-20 05:59:59 UTC
#> 13 ti_000d 2024-10-20 06:00:00 UTC--2024-10-20 06:29:59 UTC
#> 14 ti_000e 2024-10-20 06:30:00 UTC--2024-10-20 06:59:59 UTC
#> 15 ti_000f 2024-10-20 07:00:00 UTC--2024-10-20 07:29:59 UTC
#> 16 ti_0010 2024-10-20 07:30:00 UTC--2024-10-20 07:59:59 UTC
#> 17 ti_0011 2024-10-20 08:00:00 UTC--2024-10-20 08:29:59 UTC
#> 18 ti_0012 2024-10-20 08:30:00 UTC--2024-10-20 08:59:59 UTC
#> 19 ti_0013 2024-10-20 09:00:00 UTC--2024-10-20 09:29:59 UTC
#> 20 ti_0014 2024-10-20 09:30:00 UTC--2024-10-20 09:59:59 UTC
#> 21 ti_0015 2024-10-20 10:00:00 UTC--2024-10-20 10:29:59 UTC
#> 22 ti_0016 2024-10-20 10:30:00 UTC--2024-10-20 10:59:59 UTC
#> 23 ti_0017 2024-10-20 11:00:00 UTC--2024-10-20 11:29:59 UTC
#> 24 ti_0018 2024-10-20 11:30:00 UTC--2024-10-20 11:59:59 UTC
#> 25 ti_0019 2024-10-20 12:00:00 UTC--2024-10-20 12:29:59 UTC
#> 26 ti_001a 2024-10-20 12:30:00 UTC--2024-10-20 12:59:59 UTC
#> 27 ti_001b 2024-10-20 13:00:00 UTC--2024-10-20 13:29:59 UTC
#> 28 ti_001c 2024-10-20 13:30:00 UTC--2024-10-20 13:59:59 UTC
#> 29 ti_001d 2024-10-20 14:00:00 UTC--2024-10-20 14:29:59 UTC
#> 30 ti_001e 2024-10-20 14:30:00 UTC--2024-10-20 14:59:59 UTC
#> 31 ti_001f 2024-10-20 15:00:00 UTC--2024-10-20 15:29:59 UTC
#> 32 ti_0020 2024-10-20 15:30:00 UTC--2024-10-20 15:59:59 UTC
#> 33 ti_0021 2024-10-20 16:00:00 UTC--2024-10-20 16:29:59 UTC
#> 34 ti_0022 2024-10-20 16:30:00 UTC--2024-10-20 16:59:59 UTC
#> 35 ti_0023 2024-10-20 17:00:00 UTC--2024-10-20 17:29:59 UTC
#> 36 ti_0024 2024-10-20 17:30:00 UTC--2024-10-20 17:59:59 UTC
#> 37 ti_0025 2024-10-20 18:00:00 UTC--2024-10-20 18:29:59 UTC
#> 38 ti_0026 2024-10-20 18:30:00 UTC--2024-10-20 18:59:59 UTC
#> 39 ti_0027 2024-10-20 19:00:00 UTC--2024-10-20 19:29:59 UTC
#> 40 ti_0028 2024-10-20 19:30:00 UTC--2024-10-20 19:59:59 UTC
#> 41 ti_0029 2024-10-20 20:00:00 UTC--2024-10-20 20:29:59 UTC
#> 42 ti_002a 2024-10-20 20:30:00 UTC--2024-10-20 20:59:59 UTC
#> 43 ti_002b 2024-10-20 21:00:00 UTC--2024-10-20 21:29:59 UTC
#> 44 ti_002c 2024-10-20 21:30:00 UTC--2024-10-20 21:59:59 UTC
#> 45 ti_002d 2024-10-20 22:00:00 UTC--2024-10-20 22:29:59 UTC
#> 46 ti_002e 2024-10-20 22:30:00 UTC--2024-10-20 22:59:59 UTC
#> 47 ti_002f 2024-10-20 23:00:00 UTC--2024-10-20 23:29:59 UTC
#> 48 ti_0030 2024-10-20 23:30:00 UTC--2024-10-20 23:59:59 UTC