Skip to content

Commit

Permalink
Merge pull request #18 from mpadge/master
Browse files Browse the repository at this point in the history
strip file paths from zip_list; closes #17
  • Loading branch information
dhersz authored Jun 21, 2021
2 parents aaa3de2 + ec81069 commit 9759db2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions R/import_gtfs.R
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,14 @@ import_gtfs <- function(path,
quiet
)

# assign names to 'gtfs'

names(gtfs) <- files_to_read
# assign names to 'gtfs', noting that zip_list may return full paths, which
# need to be stripped here

file_names <- vapply (files_to_read, function (i)
utils::tail (strsplit (i, .Platform$file.sep) [[1]], 1),
character (1),
USE.NAMES = FALSE)
names(gtfs) <- file_names

# create gtfs object from 'gtfs'

Expand Down

0 comments on commit 9759db2

Please sign in to comment.