| stepfun | R Documentation |
Given the vectors (x[1],...,x[n]) and (y[0],y[1],...,y[n]) (one value more!), stepfun(x, y) returns an interpolating step function, say f_n. This is the cadlag version (right = FALSE) of the stepfun function from package stats. The step function value f_n(t) equals to the constant y[k-1] for t in [x[k-1], x[k]) so that
f_n(t) = \sum_{k=1}^{n+1} y_{k-1} {1}_{[x_{k-1}, x_{k})}(t),
withx_0=-\infty and x_{n+1}=+\infty.
stepfun(x, y)
x |
Numeric vector giving the knots or jump locations of the step function. Must be sorted with unique values. |
y |
Numeric vector one longer than x, giving the heights of the function values between the c |
This function is defined for documentation purposes only. See stepfun and approxfun.
A C++ version of this function is available. See vignette('IBMPopSim_cpp') for more details.
Objet of class stepfun with option right = FALSE (cadlag function).
plot.stepfun and max.stepfun.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.