signal_fill {eseis} | R Documentation |
Fill NA-gaps of a signal
Description
This function performs linear interpolation of NA values.
Usage
signal_fill(data)
Arguments
data |
|
Details
Note that the procedure will contaminate the signal by artefacts as increasingly larger data gaps are filled with interpolated values.
Value
eseis
object, numeric vector or list of objects,
interpolated data set(s).
Author(s)
Michael Dietze
Examples
## create synthetic data set and add NA-gaps
x <- eseis::signal_detrend(data = runif(1000))
x_gap <- x
x_gap[100:102] <- NA
x_gap[500:530] <- NA
## fill gaps
y <- signal_fill(data = x_gap)
## filter both data sets
x <- signal_filter(data = x, f = c(1, 3), dt = 1/200)
y <- signal_filter(data = y, f = c(1, 3), dt = 1/200)
## plot both data sets
plot(y, type = "l", col = "grey", lwd = 3)
lines(x, col = "red")
[Package eseis version 0.7.3 Index]