This function removes the first and/or last n records from each time-series.
It works for both Raw and Agg formats.
mc_prep_trim(data, start = TRUE, end = FALSE, n = 1, logger_type = NULL)myClim object see myClim-package
logical; trim first n records (default TRUE)
logical; trim last n records (default FALSE)
number of records to trim from selected side(s); must be positive integer (default 1)
optional filter; vector of logger types to trim in Raw-format (default NULL)
myClim object in the same format as input, with trimmed time-series.
In Raw-format, trimming can be restricted to selected logger types with logger_type.
In Agg-format, logger_type is ignored.
If both start and end are TRUE, the function trims n records from both sides.
When the resulting number of records is negative, the output time-series is empty.
data_trim <- mc_prep_trim(mc_data_example_clean, start=TRUE, end=TRUE,
n=1, logger_type=c("Thermo", "TMS"))