refresh_secs_columns: Refresh the *_secs columns of a table after its time strings...

View source: R/utils.R

refresh_secs_columnsR Documentation

Refresh the ⁠*_secs⁠ columns of a table after its time strings changed

Description

Functions that rewrite time strings keep any pre-existing ⁠<time>_secs⁠ columns in sync, because other functions use these columns as-is (see convert_time_to_seconds()). Columns that don't exist are skipped.

Usage

refresh_secs_columns(dt, time_cols, rows = NULL)

Arguments

dt

A data.table, modified by reference.

time_cols

A character vector with the names of the time string columns (e.g. "departure_time").

rows

An integer vector with the rows whose times changed, or NULL for all rows.

Value

The table, invisibly.


gtfstools documentation built on Oct. 28, 2026, 5:13 p.m.