Learn R Programming

myClim (version 1.5.0)

mc_prep_expandtime: 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
)

Value

raw myClim data with expanded datetime.

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.

Examples

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

Run the code above in your browser using DataLab