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 )

