piece               package:smoothSurv               R Documentation

_L_e_f_t _C_o_n_t_i_n_u_o_u_s _P_i_e_c_e_w_i_s_e _C_o_n_s_t_a_n_t _F_u_n_c_t_i_o_n _w_i_t_h _a _F_i_n_i_t_e _S_u_p_p_o_r_t.

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

     Function to evaluate a left continuous piecewise constant function
     with a finite support.

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

         piece(x, breaks, values)

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

       x: Vector of values where the piecewise constant function should
          be evaluated. 

  breaks: Vector of sorted breakpoints of the piecewise constant
          function. 

  values: Values of the piecewise constant function. It takes the value
          'value[i]' on the interval '(breaks[i], breaks[i+1]]'.  The
          function is assumed to be zero outside its range specified as
          '(breaks[1], breaks[length(breaks)]]'. The length of the
          vector 'values' must be equal to 'length(breaks) - 1' 

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

     The value of the piecewise constant function.

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

     Arno&#353t Kom&#225rek komarek@karlin.mff.cuni.cz

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

     my.breaks <- c(-2, 1.5, 4, 7)
     my.values <- c(0.5, 0.9, -2)
     grid <- seq(-3, 8, by = 0.25)
     piece(grid, my.breaks, my.values)

