RangedData-utils           package:IRanges           R Documentation

_R_a_n_g_e_d_D_a_t_a _u_t_i_l_i_t_y _f_u_n_c_t_i_o_n_s

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

     Utility functions for manipulating 'RangedData' objects.

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

     ## S4 method for signature 'expressionORlanguage,
     ##   RangedData':
     eval(expr, envir, enclos =
     parent.frame())
     ## S4 method for signature 'RangedData':
     range(x, ..., na.rm = FALSE)

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

    expr: The 'expression', 'call', or 'name' to be evaluated.

   envir: The 'RangedData' object in which to evaluate 'expr'.

  enclos: The 'environment' in which to look for symbols that do not
          exist in the environment formed from 'RangedData'.

       x: A 'RangedData' object

     ...: Additional 'RangedData' objects

   na.rm: Ignored

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

     The 'eval' method converts the 'RangedData' object specified in
     'envir' to an 'environmnent', with 'enclos' as its parent, and
     then evaluates 'expr' within that environment. The 'RangedData'
     environment contains the following objects:

     '_r_a_n_g_e_s' The result of 'unlist(ranges(envir))', i.e. all of the
          ranges in a single 'Ranges' object.

     '_c_o_l_n_a_m_e_s(_e_n_v_i_r)' The data columns in 'envir' are stored
          individually by their column names.

     The objects are not actually copied into the environment. Rather,
     they are dynamically bound using 'makeActiveBinding'. This
     prevents unnecessary copying of the data from the external vectors
     into R vectors. The values are cached, so that the data is not
     copied every time the symbol is accessed.

     'range' returns a 'RangesList' resulting from calling
     'range(ranges(x))', i.e. the bounds of the ranges in each space.

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

     The result of expression evaluation.

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

     Michael Lawrence

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

     'FilterRules' objects, which can be evaluated on a 'RangedData',
     and the base 'eval' function.

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

       ranges <- IRanges(c(1,2,3),c(4,5,6))
       score <- c(10L, 2L, NA)
       rd <- RangedData(ranges, score)
       eval(quote(score > 3), rd)

       range(rd)
       rd2 <- RangedData(IRanges(c(5,2,0), c(6,3,1)))
       range(rd, rd2)

