Description Usage Arguments Details Value Author(s) See Also Examples
Computes lagged difference within blocks and on selected elements.
1 2 |
x,time |
A vector in |
id |
A valid |
ind |
A logical vector that designates a subset of |
lag |
An integer specifying the lag. |
fill |
A value to use when no other value is appropriate. |
diff.op |
A function that subtracts one value from another. |
... |
Further arguments passed to |
These functions operate on data sets in block-format
.
Essentially, the standard diff
function is applied
within each block, except that a function diff.op
can be
specified for doing the subtraction. Additionally, a subset on
which to perform the operation can be selected with ind
. For
elements that are not selected the corresponding result is given by
fill
. The first lag
elements of each block are the
result are also assigned the value fill
so that the result is
in block-format
with respect to id
.
For time values, blk.intereventTime
is an alias with a more
descriptive name and a different default diff.op
.
A vector in block-format
with respect to id
containing the differenced values.
Ben Rich <benjamin.rich@certara.com>
block-format
diff
deltat
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.