getBitIndicators            package:RCurl            R Documentation

_O_p_e_r_a_t_e _o_n _b_i_t _f_i_e_l_d_s

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

     The 'getBitIndicators' function decompose a value into its
     respective bit components. The 'setBitIndicators' combines
     individual components into a single number to "set" a bit field
     value.

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

     getBitIndicators(val, defs)
     setBitIndicators(vals, defs)

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

     val: the value to break up into the bit field components.

    defs: the named integer vector that defines the bit field elements.

    vals: the individual components that are to be combined into a
          single integer value representing the collection of
          components. These can be given as names or integer values
          that correspond to the elements in the defs, either by name
          or value. 

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

     'getBitIndicators' returns a named integer vector representing the
     components of the bit field in the value. The names of the vector
     give the symbolic elements that were set in the value.

     'setBitIndicators' returns a single integer value representing the
     value from combining the different components (e.g. ORing the bits
     of the different values).

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

     Duncan Temple Lang <duncan@wald.ucdavis.edu>

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

     Curl homepage <URL: http://curl.haxx.se>

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

     'The features field in \curl{curlVersion}.'

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

       getBitIndicators(7, c(A = 1, B = 2, C = 4))
       getBitIndicators(3, c(A = 1, B = 2, C = 4))
       getBitIndicators(5, c(A = 1, B = 2, C = 4))

