Expands (downscales) time steps in raw myClim objects, e.g. from 1 hour to 15 minutes.
The original step must be a multiple of the new step (e.g. 15 → 5 minutes works,
but 15 → 10 minutes does not).
Newly created gaps in the expanded series are filled with NA.
mc_prep_expandtime(
data,
to_step,
localities = NULL,
loggers = NULL,
from_step = NULL
)cleaned myClim object see myClim-package
new time step in seconds (e.g. 3600 for one hour)
IDs of localities to expand. If NULL, expands all localities (default)
names of loggers to expand. If NULL, expands all loggers (default).
original time step in seconds to expand.
If NULL, expands all loggers with a step longer than to_step.
raw myClim data with expanded datetime.
Works only with raw myClim objects.
If from_step is specified, only loggers with this step are expanded;
loggers with other steps remain unchanged.
mc_prep_expandtime(mc_data_example_clean, to_step = 300, localities = "A1E05", loggers = "Thermo_1")
#> myClim object created with myClim package version 1.5.0
#> raw format
#> 3 localities, 5 loggers, 13 sensors
#> sensors: Dendro_T, Dendro_raw, HOBO_RH, HOBO_T, TMS_T1, TMS_T2, TMS_T3, TMS_moist, Thermo_T
#> # A tibble: 13 × 14
#> locality_id serial_number sensor_id sensor_name start_date
#> <chr> <chr> <chr> <chr> <dttm>
#> 1 A1E05 91184101 Thermo_T Thermo_T 2020-10-28 08:45:00
#> 2 A1E05 92201058 Dendro_T Dendro_T 2020-10-31 12:00:00
#> 3 A1E05 92201058 Dendro_raw Dendro_raw 2020-10-31 12:00:00
#> 4 A2E32 94184103 TMS_T1 TMS_T1 2020-10-16 06:15:00
#> 5 A2E32 94184103 TMS_T2 TMS_T2 2020-10-16 06:15:00
#> 6 A2E32 94184103 TMS_T3 TMS_T3 2020-10-16 06:15:00
#> 7 A2E32 94184103 TMS_moist TMS_moist 2020-10-16 06:15:00
#> 8 A2E32 20024338 HOBO_T HOBO_T 2020-10-09 08:00:00
#> 9 A2E32 20024338 HOBO_RH HOBO_RH 2020-10-09 08:00:00
#> 10 A6W79 94184102 TMS_T1 TMS_T1 2020-10-06 09:00:00
#> 11 A6W79 94184102 TMS_T2 TMS_T2 2020-10-06 09:00:00
#> 12 A6W79 94184102 TMS_T3 TMS_T3 2020-10-06 09:00:00
#> 13 A6W79 94184102 TMS_moist TMS_moist 2020-10-06 09:00:00
#> # ℹ 9 more variables: end_date <dttm>, step_seconds <int>, period <chr>,
#> # min_value <dbl>, max_value <dbl>, count_values <int>, count_na <int>,
#> # height <chr>, calibrated <lgl>