shrinkVector           package:HilbertVis           R Documentation

_s_h_r_i_n_k _a _v_e_c_t_o_r _b_y _p_a_r_t_i_t_i_o_n_i_n_g _i_t _i_n_t_o _b_i_n_s _a_n_d _t_a_k_i_n_g _t_h_e _m_a_x_i_m_a _i_n
_t_h_e _b_i_n_s

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

     Given a (potentially very long) vector, the vector is partitioned
     into a given  number of (up to rounding errors) equally long bins,
     and a vector summerizing   each of the bins with one number it
     returned.

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

     shrinkVector(vec, newLength,  mode = c("max", "min", "absmax", "mean"))

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

     vec: The vector to be shrunk. May be numeric or integer.

newLength: The desired size of the return vector, i.e., the number of
          partitions 

    mode: the summerization mode: 'max': take the maximal value of each
          bin; 'min': take the minimal value of each bin; 'absmax':
          take the value with largest absolute value; 'mean': take the
          mean of the bin values. 

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

     A vector of length 'newLength' with the summary values of each of
     the bin of 'vector'.

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

     Simon Anders, EMBL-EBI (sanders\@fs.tum.de)

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

     'plotLongVector', 'ShortRead::pileup', 
     'HilbertVisGui::simpleLinPlot'

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

        shrinkVector( 100000 + 1:1000, 17 )

