first                package:pastecs                R Documentation

_G_e_t _t_h_e _f_i_r_s_t _e_l_e_m_e_n_t _o_f _a _v_e_c_t_o_r

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

     Extract the first element of a vector. Useful for the
     'turnogram()' function

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

     first(x, na.rm=FALSE)

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

       x: a numerical vector 

   na.rm: if 'na.rm=TRUE', then the first non-missing value (if any) is
          returned. By default, it is FALSE and the first element
          (whatever its value) is returned 

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

     a numerical value

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

     Philippe Grosjean (phgrosjean@sciviews.org), Frdric Ibanez
     (ibanez@obs-vlfr.fr)

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

     'last', 'turnogram'

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

     a <- c(NA, 1, 2, NA, 3, 4, NA)
     first(a)
     first(a, na.rm=TRUE)

