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

