View source: R/UTILS-reinterpolate.R

reinterpolate | R Documentation |

This function is just a wrapper for the native function `stats::approx()`

to do simple linear
reinterpolation. It also supports matrices, data frames, and lists of time series.

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

`x` |
Data to reinterpolate. Either a vector, a matrix/data.frame where each row is to be reinterpolated, or a list of vectors/matrices. |

`new.length` |
Desired length of the output series. |

`multivariate` |
Is |

Multivariate series must have time spanning the rows and variables spanning the columns.

Reinterpolated time series

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)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.