| update_tsibble {tsibble} | R Documentation |
Update key and index for a tsibble
update_tsibble(x, key = NULL, index = NULL, regular = NULL, validate = TRUE)
x |
A tsibble. |
key |
Variable(s) that define unique time indices, used in conjunction
with the helper |
index |
A bare (or unquoted) variable to specify the time index variable. |
regular |
Regular time interval ( |
validate |
|
Default NULL inherits attributes from x.
pedestrian %>% group_by_key() %>% mutate(Hour_Since = Date_Time - min(Date_Time)) %>% update_tsibble(index = Hour_Since)