mts_trim | R Documentation |
Trims the time range of an mts object by removing time steps from the start and end that contain only missing values.
mts_trim(mts = NULL)
mts |
mts object. |
A subset of the incoming mts time series object.
(A list with meta
and data
dataframes.)
library(MazamaTimeSeries)
# Untrimmed range
range(example_mts$data$datetime)
# Replace the first 50 data values for all non-"datetime" columns
example_mts$data[1:50, -1] <- NA
# Trimmed range
mts_trimmed <- mts_trim(example_mts)
range(mts_trimmed$data$datetime)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.