Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for dplyr 1.1.1 #197

Merged
merged 3 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use a non-equi join in set_dates_service()
  • Loading branch information
DavisVaughan committed Feb 27, 2023
commit e215f9ca7822197da85f1a8b614adae206726bf9
8 changes: 4 additions & 4 deletions R/dates.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ set_dates_services <- function(gtfs_obj) {
dplyr::filter(bool == 1) %>% dplyr::select(service_id, weekday, start_date, end_date)

# set services to dates according to weekdays and start/end date
date_service_df <-
suppress_matches_multiple_warning(
dplyr::full_join(dates, service_ids_weekdays, by="weekday")
date_service_df <- dates %>%
dplyr::inner_join(
service_ids_weekdays,
by = dplyr::join_by(weekday, between(date, start_date, end_date))
) %>%
dplyr::filter(date >= start_date & date <= end_date) %>%
dplyr::select(-weekday, -start_date, -end_date)

# addtions and exceptions
Expand Down
3 changes: 2 additions & 1 deletion R/globals.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ if (getRversion() >= "3.1.0") {
"start_time",
"end_time",
"feed_start_date",
"feed_end_date"
"feed_end_date",
"between"
)
)
}