Description Usage Arguments Value See Also Examples
Differentiate or smooth DRIFT-spectrum using spline fit model. This is an S3-method for class drift.
1 2 |
x |
an object of |
n |
integer order of derivative. First order derivative is the default value. Assign zero to perform smoothing which is the zero-order derivative. |
... |
other named parameters to
|
An object of S3-class
drift.
Other drift:
as.data.frame.drift()
,
cbind.drift()
,
channel()
,
coal_drift()
,
median.drift()
,
plot.drift()
,
read.drift()
,
slice()
,
write.drift()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | s <- coal_drift()
# first derivative:
ds <- diff(s)
plot(ds)
# simple smoothing of signal:
ss <- diff(s, 0)
plot(ss)
# second derivative:
d2s <- diff(s, n = 2)
plot(d2s)
# sequential application of differentiation is not equivalent to higher
# order differentiation in place:
range(diff(diff(s)) - diff(s, 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.