firstdot             package:wavethresh             R Documentation

_R_e_t_u_r_n _t_h_e _l_o_c_a_t_i_o_n _o_f _t_h_e _f_i_r_s_t _p_e_r_i_o_d _c_h_a_r_a_c_t_e_r _w_i_t_h_i_n _a _c_h_a_r_a_c_t_e_r _s_t_r_i_n_g (_f_o_r _a _v_e_c_t_o_r _o_f _s_t_r_i_n_g_s _o_f _a_r_b_i_t_r_a_r_y _l_e_n_g_t_h).

_D_e_s_c_r_i_p_t_i_o_n:

     Returns the index of the location of the first period character
     within a character string for a series of strings in a vector of
     character string of arbitrary length). 

     This is a subsidiary routine for 'rmget' and not really intended
     for user use.

_U_s_a_g_e:

     firstdot(s)

_A_r_g_u_m_e_n_t_s:

       s: Vector of character strings.

_D_e_t_a_i_l_s:

     A very simple function. It searches through a character string for
     the first period character and the returns the position of that
     period character. It performs this search for each of the
     character strings in the input vector.

_V_a_l_u_e:

     A vector of integers of the same length as the input vector. Each
     integer in the output vector is the index position of the first
     period character in the corresponding character string in the
     input vector. If a character string does not contain a period
     character then the corresponding output integer is zero.

_R_E_L_E_A_S_E:

     Version 3.9 Copyright Guy Nason 1998

_R_e_f_e_r_e_n_c_e_s:

     Nason, G.P., von Sachs, R. and Kroisandt, G. (1998). Wavelet
     processes and adaptive estimation of the evolutionary wavelet
     spectrum. _Technical Report_, Department of Mathematics University
     of Bristol/ Fachbereich Mathematik, Kaiserslautern.

_S_e_e _A_l_s_o:

     'rmget'

_E_x_a_m_p_l_e_s:

     #
     # Let's find the first dot in the following strings...
     #
     #firstdot("mary.had.a.little.lamb")
     #[1] 5
     #
     # I.e. the first period was after "mary" -- the fifth character
     #
     # This following string doesn't have any periods in it.
     #
     #firstdot("StellaArtois")
     #[1] 0
     #
     # The function works on vectors of character strings
     #
     # TopCricketAve <- c("Don.Bradman", "Graeme.Pollock", "George.Headley",
     #       "Herbert.Sutcliffe", "Vinod.Kambli", "Javed.Miandad")
     # firstdot(TopCricketAve)
     ##[1] 4 7 7 8 6 6

