mc_prep_expandtime: Expand time steps

View source: R/prep.R

mc_prep_expandtimeR Documentation

Expand time steps

Description

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.

Usage

mc_prep_expandtime(
  data,
  to_step,
  localities = NULL,
  loggers = NULL,
  from_step = NULL
)

Arguments

data

cleaned myClim object see myClim-package

to_step

new time step in seconds (e.g. 3600 for one hour)

localities

IDs of localities to expand. If NULL, expands all localities (default)

loggers

names of loggers to expand. If NULL, expands all loggers (default).

from_step

original time step in seconds to expand. If NULL, expands all loggers with a step longer than to_step.

Details

Works only with raw myClim objects. If from_step is specified, only loggers with this step are expanded; loggers with other steps remain unchanged.

Value

raw myClim data with expanded datetime.

Examples

mc_prep_expandtime(mc_data_example_clean, to_step = 300, localities = "A1E05", loggers = "Thermo_1")

myClim documentation built on Nov. 5, 2025, 7:35 p.m.