pts                  package:adlift                  R Documentation

_p_t_s

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

     This function constructs the gridpoints ('X' values) from a vector
     of lengths, with optional starting point.

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

     pts(input)

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

   input: a vector containing the 'X' starting point in the first
          entry, and the distances between observed values. 'input[1]'
          can be NA.

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

     The function constructs the grid values using the first entry in
     input as the first gridpoint, consecutively adding the given
     lengths in the rest of input to find the other gridpoints. If
     'input[1]' is NA, then the starting point of the gridpoint vector
     'X' is taken to be 'sum(lengths)/(length(lengths)+1)'.

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

 lengths: a vector of length '(length(input)-1)' with the distances
          between the constructed gridpoints(this is
          'input[2:length(input)]').

       X: the constructed gridpoint vector.

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

     Matt Nunes (matt.nunes@bristol.ac.uk), Marina Popa
     (Marina.Popa@bristol.ac.uk)

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

     'fwtnp', 'fwtnpmp'

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

     y<-runif(20)
     y
     #
     y1<-c(0,y)
     y2<-c(NA,y)
     #
     #
     pts(y1)$X
     #the gridpoints, with specified startpoint of zero.
     #
     #
     pts(y2)$X
     #the grid vector with unspecified startpoint.
     # 

