Learn R Programming

eseis (version 0.6.0)

time_clip: Clip time vector.

Description

The function clips a time vector based on provided limits.

Usage

time_clip(time, limits)

Value

POSIXct vector, clipped time vector.

Arguments

time

POSIXct vector, time vector.

limits

POSIXct vector of length two, time limits for clipping.

Author

Michael Dietze

Examples

Run this code

## load example data
data(rockfall)

## define limits to clip to
limits <- c(min(rockfall_t) + 10,
            max(rockfall_t) - 10)

## clip data set
rockfall_t_clip <- time_clip(time = rockfall_t, 
                             limits = limits)

## compare time ranges
range(rockfall_t)
range(rockfall_t_clip)
                     

Run the code above in your browser using DataLab