PTprocstring             package:pinktoe             R Documentation

_C_o_n_v_e_r_t_s _s_p_l_i_t_s _i_n_f_o_r_m_a_t_i_o_n _p_r_e_s_e_n_t _i_n _a_n _r_p_a_r_t _o_b_j_e_c_t _t_o _a_n _S _l_i_k_e _f_o_r_m_a_t

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

     Splits information (which can be obtained indirectly from
     path.rpart) in R comes in phrases like "Country=abc" (for factor
     variables) or "Weight<=6" (for numeric variables) needs to be
     converted into the format ":abc" and "<=6" to match the S-like
     format.

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

     PTprocstring(s, vtype)

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

       s: Splits information string from 'rpart' (via path.rpart) 

   vtype: Whether the variable is "factor" or not 

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

     If 'vtype' is not a factor then the string is treated as if it
     were numeric.

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

     A splits string but in S format.

_N_o_t_e:

     Not intended for general use

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

     Guy P Nason

_R_e_f_e_r_e_n_c_e_s:

     'PT', 'pinktoe'

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

     'PT', 'pinktoe'

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

     #
     # Process string "Country=abc" for factor variable
     #
         PTprocstring("Country=abc", "factor")
     #
     # [1] ":abc"
     #
     # Process string "Weight<=6" for numeric variable
     #
         PTprocstring("Weight<=6", vtype="numeric")
     #
     # [1] "<=6"
     #

