Learn R Programming

dataprep (version 0.1.8)

remove_diurnal_cycle: Remove diurnal cycle

Description

Removes the mean diurnal (or other periodic) cycle by subtracting the average value for each time period (hour, month, or day). The grouping is based on a time column.

Usage

remove_diurnal_cycle(data, cols = NULL, date_col = NULL,
                     by = "hour", verbose = FALSE)

Value

A data frame with diurnal cycle removed.

Arguments

data

A data frame with a time column.

cols

Column indices or names to adjust.

date_col

Time column index or name.

by

Period for cycle removal: "hour", "month", or "day".

verbose

Logical; if TRUE, prints progress message.

Examples

Run this code
remove_diurnal_cycle(data[1:200, c(1, 4, 17:19)], cols = 3:5, date_col = 1, by = "hour")

Run the code above in your browser using DataLab