Skip to content

Commit

Permalink
styling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhersz committed Jul 28, 2021
1 parent 50d443f commit 9dd29cd
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 18 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: gtfsio
Title: Read and Write General Transit Feed Specification (GTFS) Files
Version: 0.1.2.9002
Version: 0.1.2.9003
Authors@R:
c(person(given = "Daniel",
family = "Herszenhut",
Expand Down
20 changes: 12 additions & 8 deletions R/gtfs_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,23 @@ print.gtfs <- function(x, ...) {

#' Print summary of a GTFS object
#'
#' @name summary.gtfs
#' @param object A GTFS object
#' @param ... ignored here
#' @param object A GTFS object.
#' @param ... Ignored.
#'
#' @examples
#' gtfs_path <- system.file("extdata/ggl_gtfs.zip", package = "gtfsio")
#' gtfs <- import_gtfs(gtfs_path)
#' summary (gtfs)
#'
#' summary(gtfs)
#'
#' @export
summary.gtfs <- function (object, ...) {
summary.gtfs <- function(object, ...) {

cat(
"A gtfs object with the following tables",
"and respective numbers of entries in each:\n"
)

cat ("A gtfs object with the following tables ",
"and respective numbers of entries in each:\n")
print(vapply(object, nrow, numeric(1)))

print (vapply (object, nrow, numeric (1)))
}
11 changes: 7 additions & 4 deletions R/import_gtfs.R
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,13 @@ import_gtfs <- function(path,
# 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)
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
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"codeRepository": "https://github.com/r-transit/gtfsio",
"issueTracker": "https://github.com/r-transit/gtfsio/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.1.2.9002",
"version": "0.1.2.9003",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -123,7 +123,7 @@
"sameAs": "https://CRAN.R-project.org/package=zip"
}
],
"fileSize": "151533.981KB",
"fileSize": "151533.906KB",
"keywords": [
"r",
"gtfs"
Expand Down
8 changes: 5 additions & 3 deletions man/summary.gtfs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9dd29cd

Please sign in to comment.