Learn R Programming

dtwclust (version 3.1.1)

reinterpolate: Wrapper for simple linear reinterpolation

Description

This function is just a wrapper for the native function approx to do simple linear reinterpolation.

Usage

reinterpolate(x, new.length, multivariate = FALSE)

Arguments

x
Data to reinterpolate. Either a vector, a matrix/data.frame where each row is to be reinterpolated, or a list of vectors.
new.length
Desired length of the output series.
multivariate
Is x a multivariate time series? It will be detected automatically if a list is provided in x.

Value

Reinterpolated time series

Examples

Run this code

data(uciCT)

# list of univariate series
series <- reinterpolate(CharTraj, 205L)

# list of multivariate series
series <- reinterpolate(CharTrajMV, 205L)

# single multivariate series
series <- reinterpolate(CharTrajMV[[1L]], 205L, TRUE)

Run the code above in your browser using DataLab