station_search: Find Senamhi stations matching various criteria

Description Usage Arguments Value Author(s) Examples

Description

Search for Senamhi stations by name, region, available data, and/or distance to a target.

Usage

1
2
3
station_search(name = NULL, ignore.case = TRUE, glob = FALSE,
  region = NULL, period = NULL, config = NULL, target = NULL,
  dist = 0:100, sort = TRUE, ...)

Arguments

name

character; optional character vector to filter results by station name.

ignore.case

logical; by default the search for station names is not case-sensitive.

glob

logical; whether to allow regular expressions in the name. See glob2rx.

region

character; optional character string to filter results by region.

period

numeric; optional, either a range of years or the total number of years of data that must be available.

config

character; the configuration of the station ((m)eteorological or (h)ydrological)

target

numeric; optional station ID of a target station, or a vector of length 2 containing latitude and longitude (in that order).

dist

numeric; vector with a range of distance from the target in km. Only used if a target is specified. (default is 0:100)

sort

Boolean; if TRUE (default), will sort the resultant table by distance from 'target'. Only used if a target is specified.

...

Additional arguments passed to grep.

Value

A data frame containing the details of matching stations.

Author(s)

Conor I. Anderson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Find all stations containing 'Tarapoto' in their name.
station_search('Tarapoto')

# Find all stations starting with "San"
station_search(name = "San*", glob = TRUE)

# Find stations with data available from 1971 to 2000.
station_search(period = 1971:2000)

# Find all stations between 0 and 100 km from Station '000401'
station_search(target = '000401', dist = 0:100)

ConorIA/senamhiR documentation built on May 6, 2019, 12:51 p.m.