Learn R Programming

seas (version 0.5-2)

getstnname: Get station name

Description

Retrieves the full name from mscstn using an ID

Usage

getstnname(id)

Arguments

id

numeric or character ID array

Value

Returns the station name(s). If the ID does not exist, returns NULL.

Details

This function simply converts the ID used in climate data frames into a meaningful name using mscstn. Presently it is useful only for Meteorological Service of Canada weather stations in BC, AB and YT, however getstnname can be overridden by another (similar) function and data object for other regions.

See Also

mscstn, mscdata, .seastitle

Examples

Run this code
# NOT RUN {
data(mscdata)

mscdata$id[1]
getstnname(mscdata$id[1])

ids <- levels(mscdata$id)
data.frame(id=I(ids), name=getstnname(ids))
# }

Run the code above in your browser using DataLab