pts {adlift} | R Documentation |
This function constructs the gridpoints (X values) from a vector of lengths, with optional starting point.
pts(input)
input |
a vector containing the X starting point in the first entry, and the distances between observed values. input[1] can be NA. |
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)
.
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. |
Matt Nunes (matt.nunes@bristol.ac.uk), Marina Popa (Marina.Popa@bristol.ac.uk)
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. #