parse_site_name: Split site name into siteID (used for NWIS site numbers)

parse_site_nameR Documentation

Split site name into siteID (used for NWIS site numbers)

Description

Split site name into siteID (used for NWIS site numbers)

Usage

parse_site_name(site_name, out = "sitenum", use_names = length(out) > 1)

Arguments

site_name

a valid ScienceBase site (e.g., "nwis_0338102")

out

character, length 1 or 2 selected from c("database","sitenum") indicating whether you want to get back the database, the site number, or both.

use_names

logical. Should the return vector be named according to the input values?

Value

the database, sitenum, or both. If both, the return value is a data.frame; otherwise it's a vector.


USGS-R/mda.streams documentation built on June 3, 2023, 8:43 a.m.