signal_merge: Merge several signal streams into one

View source: R/signal_merge.R

signal_mergeR Documentation

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)

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.

Value

eseis object with merged input data sets

Author(s)

Michael Dietze

Examples


## 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)


coffeemuggler/eseis documentation built on Nov. 25, 2024, 8:31 p.m.