Learn R Programming

eseis (version 0.8.1)

signal_clip: Clip signal based on time vector.

Description

The function clips a seismic signal based on the corresponding time vector.

Usage

signal_clip(data, limits, time)

Value

Numeric data set clipped to provided time interval.

Arguments

data

eseis object, numeric vector or list of objects, data set to be processed.

limits

POSIXct vector of length two, time limits for clipping. Can also be a text string that will be converted to POSIXct format, with UTC assigned automatically.

time

POSIXct vector, corresponding time vector. Only needed if data is no eseis object.

Author

Michael Dietze

Examples

Run this code

## load example data
data(rockfall)

## define limits (second 10 to 20 of the signal)
limits <- c(rockfall_t[1] + 10, rockfall_t[1] + 20)

## clip signal 
rockfall_clip <- signal_clip(data = rockfall_z, 
                             time = rockfall_t, 
                             limits = limits)
                     
## clip signal using the eseis object
rockfall_clip <- signal_clip(data = rockfall_eseis, 
                             limits = limits)
                             

Run the code above in your browser using DataLab