Shifts the x scale by a given value.
Usage
signal_shift(x, y, lag, ...)
# S4 method for class 'numeric,numeric'
signal_shift(x, y, lag)
# S4 method for class 'ANY,missing'
signal_shift(x, lag)Arguments
- x, y
- A - numericvector. If- yis missing, an attempt is made to interpret- xin a suitable way (see- grDevices::xy.coords()).
- lag
- A - numericvector specifying the offset.
- ...
- Currently not used. 
Value
Returns a list with two components x and y.
See also
Other signal processing methods:
signal_bind(),
signal_correct(),
signal_drift(),
signal_mean(),
subset()
Examples
## X-ray diffraction
data("XRD")
## Plot spectrum
plot(XRD, type = "l", xlab = expression(2*theta), ylab = "Count")
## Shift by one degree
XRD_offset <- signal_shift(XRD, lag = 1)
lines(XRD_offset, type = "l", col = "red")
 
