Learn R Programming

eseis (version 0.8.0)

signal_merge: Merge several signal streams into one

Description

This function merges two or more single signals into one common. Only eseis objects are supported. Gaps will be filled with NA values unless the argument fill = TRUE. The resulting data length will correspond to the combined length of the input data. The sampling frequency must be the same for all input data sets. The meta data of the first stream will be used for the output data.

Usage

signal_merge(..., fill = FALSE)

Value

eseis object with merged input data sets

Arguments

...

eseis objects that will be merged into one output eseis object. Can also be one list that contains eseis objects.

fill

Logical value, option to fill data gaps between merged streams. Default is FALSE.

Author

Michael Dietze

Examples

Run this code

## load rockfall data set
data("rockfall")
s_1 <- rockfall_eseis

## duplicate data set and shift start time (incl. gap)
s_2 <- s_1
s_2$meta$starttime <- s_2$meta$starttime + 500

## merge data sets
s_merged <- signal_merge(s_1, s_2)

## plot merged data set
plot(s_merged)

## merge and fill gap
s_merged_filled <- signal_merge(s_1, s_2, fill = TRUE)

## plot merged data set
plot(s_merged_filled)

Run the code above in your browser using DataLab