After converting the filenames to lowercase and calling atoc2gtfs I cannot get it to work.
With transfers=TRUE the error is:
Error in names(table) <- c("Type", "del1", "Mode", "del2", "from", "del3", :
'names' attribute [10] must be the same length as the vector [4]
I think this comes from the format of the flf file. The flf file downloaded is in a verbose format, that does not match the expected format for importFLF():
The format of the alf file looks better, but is unused in atoc2gts():
Has something changed with the way National Rail provide the CIF data?
I am also having issues with the function if transfers=FALSE. The error produced here is:
2025-09-09 16:11:45.053712 Some calendar dates had incorrect start or end dates that did not align with operating day bitmask.
Services=Y09651,Y09826,G33437,Y00652,L36706,L36756,L36896,L36952,Y39679,Y39697
2025-09-09 16:11:45.493225 Constructing calendar and calendar_dates
Error in (function (.x, .f, ..., .progress = FALSE) :
ℹ In index: 3884.
Caused by error in set():
! Supplied 19 items to be assigned to 18 items of column 'start_date'.
I'm not sure why this is happening but I think it comes from there something being wrong with the “bitmask → dates” logic in atoc_overlay()? I can't see anywhere that this function guarantees the two vectors it tries to assign (start_date vs. number of target rows) have identical length.
I've downloaded the data from Network Rail, and used nr2gtfs(), which works with no issues. Ideally, I'd have wanted the transfers data, which is why I'm keen to get clarification on the above. Although I am aware there is a way to create the transfers data manually, which I'll look into further.
I'm very much an amateur with GTFS data and might be missing something or doing something wrong! Any advice/guidance would be greatly appreciated.