Learn R Programming

gtfstools (version 2.0.1)

refresh_secs_columns: 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)

Value

The table, invisibly.

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.