getstnname               package:seas               R Documentation

_G_e_t _s_t_a_t_i_o_n _n_a_m_e

_D_e_s_c_r_i_p_t_i_o_n:

     Retrieves the full name from 'mscstn' using an ID

_U_s_a_g_e:

     getstnname(id)

_A_r_g_u_m_e_n_t_s:

      id: 'numeric' or 'character' ID array

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

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

_A_u_t_h_o_r(_s):

     M.W. Toews

_S_e_e _A_l_s_o:

     'mscstn', 'mscdata', '.seastitle'

_E_x_a_m_p_l_e_s:

     data(mscdata)

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

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

