convert_frequency_dataset_overlapping: Convert Dataset Frequency Using Overlapping Windows.

Description Usage Arguments Value

View source: R/model_helper.R

Description

Convert dataset to bigger frequency provided by new_freq using max/avg operators, the rest will be truncated off.

Usage

1
2
3
4
5
6
7
8
9
convert_frequency_dataset_overlapping(
  dataset,
  new_freq,
  response,
  keep.names = TRUE,
  right.aligned = TRUE,
  jump = 1,
  length.out = NULL
)

Arguments

dataset

A vector of numeric value.

new_freq

An integer value.

response

If "max" is provided, then take max for each new_freq observations, if "avg" is provided, take avg for each new_freq observations.

keep.names

If this argument is TRUE, then if dataset has names representing the time stamp of each observation, then the output vector also keep names as aggretated time stamp of each observation.

right.aligned

If this argument is TRUE, then the converted frequency will be aligned from the right side instead of the left side.

jump

A numeric value representing the number of steps to jump after each windowing operations. Default value is 1.

length.out

A numeric value or NULL controlling the length of the output sequence.

Value

The vector of same size of input vector.


carlonlv/DataCenterSim documentation built on Jan. 9, 2022, 3:26 p.m.