Learn R Programming

gtfs2gps (version 1.4-1)

filter_day_period: Filter GTFS data within a period of the day

Description

Updates a GTFS feed filtering only the routes, shapes, trips, stops, agencies and services that are active within a given period of the day.

Usage

filter_day_period(gtfs, period_start = "00:00:01", period_end = "23:59:59")

Arguments

gtfs

A GTFS data.

period_start

A string of type "hh:mm" indicating start of the period (defaults to "00:00:01")

period_end

A string of type "hh:mm" indicating the end of the period (defaults to "23:59:59")

Value

A filtered GTFS data.

Examples

Run this code
# NOT RUN {
# read gtfs data
poa <- read_gtfs(system.file("extdata/poa.zip", package = "gtfs2gps"))

# filter gtfs data
poa_f <- filter_day_period(poa, period_start = "10:00", period_end = "10:20")
# }

Run the code above in your browser using DataLab