Skip to content

Commit

Permalink
Search by more than one station name. Some lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
ConorIA committed Jul 21, 2018
1 parent 72d1e68 commit 98aad78
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: senamhiR
Type: Package
Title: A Collection of Functions to Obtain Peruvian Climate Data
Version: 0.6.3
Version: 0.6.4
Date: 2018-06-27
Authors@R: c(person(given = c("Conor", "I."), family = "Anderson",
role = c("aut","cre"), email = "[email protected]"),
Expand Down
3 changes: 2 additions & 1 deletion R/station_search.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##'
##' @description Search for Senamhi stations by name, region, available data, and/or distance to a target.
##'
##' @param name character; optional character string to filter results by station name.
##' @param name character; optional character vector to filter results by station name.
##' @param ignore.case logical; by default the search for station names is not case-sensitive.
##' @param glob logical; whether to allow regular expressions in the \code{name}. See \code{\link{glob2rx}}.
##' @param region character; optional character string to filter results by region.
Expand Down Expand Up @@ -54,6 +54,7 @@ station_search <- function(name = NULL, ignore.case = TRUE, glob = FALSE, region
# If `name` is not NULL, filter by name
if (!is.null(name)) {
if (glob) name <- glob2rx(name)
if (length(name) > 1) name <- paste(name, collapse = "|")
filt <- filter(filt, grepl(name, Station, ignore.case = ignore.case, ...))
}

Expand Down
14 changes: 5 additions & 9 deletions man/map_stations.Rd

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

2 changes: 1 addition & 1 deletion man/station_search.Rd

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

0 comments on commit 98aad78

Please sign in to comment.