UrbanAnalyst / gtfsrouter

Routing and analysis engine for GTFS (General Transit Feed Specification) data
https://urbananalyst.github.io/gtfsrouter/
82 stars 17 forks source link

Enable route_pattern to also exclude selection #53

Closed mpadge closed 3 years ago

mpadge commented 3 years ago

Currently only works as a positive grep match. Should also add an invert_match = FALSE parameter that, when TRUE, uses grep(..., invert = TRUE) to exclude the matched items. What should it be called?

ping @AlexandraKapp

AlexandraKapp commented 3 years ago

hm, both arguments seem valid. 🤔 how about a third option: invert_route_pattern = FALSE to make it more apparent that the parameter belongs to the route_pattern within the gtfs_timetable function?

mpadge commented 3 years ago

Good idea, but how about an even better one: That commit just allows a "!" to be put at the start of any route_pattern argument in order to invert/exclude it.