RleViews-class            package:IRanges            R Documentation

_T_h_e _R_l_e_V_i_e_w_s _c_l_a_s_s

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

     The RleViews class is the basic container for storing a set of
     views (start/end locations) on the same Rle object.

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

     An RleViews object contains a set of views (start/end locations)
     on the same Rle object called "the subject vector" or simply "the
     subject". Each view is defined by its start and end locations:
     both are integers such that start <= end. An RleViews object is in
     fact a particular case of a Views object (the RleViews class
     contains the Views class) so it can be manipulated in a similar
     manner: see '?Views' for more information. Note that two views can
     overlap and that a view can be "out of limits" i.e. it can start
     before the first element of the subject or/and end after its last
     element.

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

     P. Aboyoun

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

     Views-class, Rle-class, Views-utils

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

       subject <- Rle(rep(c(3L, 2L, 18L, 0L), c(3,2,1,5)))
       myViews <- Views(subject, 3:0, 5:8)
       myViews
       subject(myViews)
       length(myViews)
       start(myViews)
       end(myViews)
       width(myViews)
       myViews[[2]]

       set.seed(0)
       vec <- Rle(sample(0:2, 20, replace = TRUE))
       vec
       Views(vec, vec > 0)

