R/find.R

Defines functions ghcn_find_stations

Documented in ghcn_find_stations

#' Find stations that match pattern
#'
#' @param pattern Character string of length one to match station names.
#' @return Data frame of station data.
#' @export
ghcn_find_stations <- function(pattern) {
  stopifnot(length(pattern) == 1)
  out <- ghcn_read_stations()
  out[grepl(pattern, out$name, ignore.case = TRUE, perl = TRUE), ]
}
rwright88/ghcn documentation built on Aug. 9, 2019, 3:55 a.m.