isWithinInterval         package:tilingArray         R Documentation

_T_e_s_t _w_h_e_t_h_e_r _a _v_e_c_t_o_r _o_f _n_u_m_b_e_r_s _i_s _w_i_t_h_i_n _a _v_e_c_t_o_r _o_f _i_n_t_e_r_v_a_l_s

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

     Test whether a vector of numbers is within a vector of intervals

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

     isWithinInterval(x, start, end)

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

       x: Numeric vector.

   start: Numeric vector.

     end: Numeric vector of same length as start.

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

     For each value 'x[i]', this function tests whether it lies within
     the interval from 'start[j]' to 'end[j]', i.e. whether 'start[j]
     <= x[i] <= end[j]'. The result is returned in a logical matrix
     whose rows correspond to 'i' and columns to 'j'.

     The implementation of this function is naive. It does not use
     loops within 'R', but can have a large memory consumption,
     corresponding to several matrices of size
     'length(x)*length(start)'

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

     Matrix of size 'length(x)*length(start)'.

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

     W. Huber <huber@ebi.ac.uk>

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

       x = 1:8
       start = seq(2, 6, by=2)
       end   = seq(4, 8, by=2)
       isWithinInterval(x, start, end)

