rescaleByWin: Approx by window when you have a value for each window (even...

View source: R/generic_utilities.R

rescaleByWinR Documentation

Approx by window when you have a value for each window (even overlapping ones) and you want to transform the values to a time series with the original sampling rate

Description

This function allows to visualize the short-term dynamics of a time series using the full vertical resolution of a screen

Usage

rescaleByWin(x, WIN, newMin, newMax, cores = 1)

Arguments

x

numeric representation of a time-series. Ideally a rats object.

WIN

numeric. Size of the window in the original series time unit (e.g. seconds)

newMin
newMax
cores
a

a numerical vector, resulting from a windowing

winSec

the size of the window used to calculate a, in seconds

incSec

the increment of each window used to calculate a, in seconds

SR

the number of samples per second of the destination time-series

midPoints

if true, the value are considered to be at the center of the window, and the result is padded right by half window

Examples

Rescale every sample of a time series over a moving window 


kleinbub/rIP documentation built on Dec. 21, 2024, 9:15 a.m.