Skip to content

Commit

Permalink
Fixing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mem48 committed Sep 11, 2024
1 parent d841d95 commit 6c1296f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/atoc_export.R
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ makeCalendar <- function(schedule, ncores = 1) {
CHECKROWS_NAME_VECTOR <- c(WEEKDAY_NAME_VECTOR, "duration", "start_date", "end_date")


res.calendar.days <- res.calendar[,..CHECKROWS_NAME_VECTOR]
res.calendar.days <- res.calendar[,CHECKROWS_NAME_VECTOR]
res.calendar.days <- data.table::transpose(res.calendar.days)
#transpose on the same size runs in around 3s, but causes named dataframe with mixed datatypes to be coerced to unnamed vector of integer.

Expand Down
4 changes: 2 additions & 2 deletions R/transxchange_export.R
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,10 @@ transxchange_export <- function(obj,
bank_holidays_inc <- break_up_holidays2(bank_holidays, "BankHolidaysOperate", cal = cal)
bank_holidays_exc <- break_up_holidays2(bank_holidays, "BankHolidaysNoOperate", cal = cal)
if (!is.null(bank_holidays_inc)) {
bank_holidays_inc <- dplyr::left_join(bank_holidays_inc, cal, by = c("hols" = "name"))
bank_holidays_inc <- dplyr::left_join(bank_holidays_inc, cal, by = c("hols" = "name"), relationship = "many-to-many")
}
if (!is.null(bank_holidays_exc)) {
bank_holidays_exc <- dplyr::left_join(bank_holidays_exc, cal, by = c("hols" = "name"))
bank_holidays_exc <- dplyr::left_join(bank_holidays_exc, cal, by = c("hols" = "name"), relationship = "many-to-many")
}
bank_holidays <- rbind(bank_holidays_inc, bank_holidays_exc)
bank_holidays <- bank_holidays[, c("trip_id", "date", "exception_type")]
Expand Down

0 comments on commit 6c1296f

Please sign in to comment.