Learn R Programming

eseis (version 0.5.0)

time_clip: Clip time vector.

Description

The function clips a time vector based on provided limits.

Usage

time_clip(time, limits)

Arguments

time

POSIXct vector, time vector.

limits

POSIXct vector of length two, time limits for clipping.

Value

POSIXct vector, clipped time vector.

Examples

Run this code
# NOT RUN {
## 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