lookup: Lookup values for a piecewise constant function
Description
Given the values and lefthand endpoints for intervals of constancy,
lookup values of the function at arbitrary values of the independent
variable.
Usage
lookup(xgrid, ygrid, x, y0 = 0)
Arguments
xgrid
Lefthand endpoints of intervals of constancy
ygrid
Values on these intervals, of same length as xgrid
x
Input vector of arbitrary independent variables.
y0
Value to be returned for values of x
that are smaller
than min(xgrid)
.
Value
~Describe the value returned
If it is a LIST, use
comp1 Description of 'comp1'
comp2 Description of 'comp2'
Examples
Run this code# NOT RUN {
## none as yet
# }
Run the code above in your browser using DataLab