asSimpleVector            package:RBioinf            R Documentation

_E_x_a_m_p_l_e _f_u_n_c_t_i_o_n_s _f_o_r _t_h_e _C_h_a_p_t_e_r _o_n _D_e_b_u_g_g_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     These functions are used to demonstrate some of the debugging
     facilities in R.

_U_s_a_g_e:

     asSimpleVector(x, mode = "logical")
     convertMode(from, to)
     setVNames(x, nm)
     subsetAsCharacter(x, i, j)

_A_r_g_u_m_e_n_t_s:

       x: input 

    mode: the mode of 'x' 

    from: a parameter

      to: another parameter

      nm: names for 'x'

       i: an index

       j: another index

_D_e_t_a_i_l_s:

     A set of functions that can be used to demonstrate debugging
     principles  and practices.

     'asSimpleVector'  converts the argument 'x' to a simple R vector
     of the given mode preserving names, dimension and dimnames.

     'subsetAsCharacter' calculates either a vector or a matrix subset
     of the argument 'x' and returns the subset after converting it to
     be of mode character. It uses 'asSimpleVector' to do the
     conversion to character and thus also preserves any names,
     dimension or dimnames in the subset.

     'setVNames' sets the names of the given vector 'x' to the argument
     'nm' and then converts 'x' to numeric using 'asSimpleVector'.

     'convertMode' converts its first argument to the mode of the
     second argument.

_V_a_l_u_e:

     Various values are returned.

_A_u_t_h_o_r(_s):

     S. DebRoy

_S_e_e _A_l_s_o:

     'browser'

