upsamplefill: Upsample and Fill

View source: R/upsamplefill.R

upsamplefillR Documentation

Upsample and Fill

Description

Upsample and fill with given values or copies of the vector elements.

Usage

upsamplefill(x, v, copy = FALSE)

Arguments

x

input data, specified as a numeric vector or matrix. In case of a vector it represents a single signal; in case of a matrix each column is a signal.

v

vector of values to be placed between the elements of x.

copy

logical. If TRUE then v should be a scalar (length(v) == 1) and each value in x are repeated v times. If FALSE (default), the values in the vector v are placed between the elements of x.

Value

upsampled vector or matrix

Author(s)

Juan Pablo Carbajal, carbajal@ifi.uzh.ch.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.

See Also

upsample

Examples

u <- upsamplefill(diag(2), 2, TRUE)
u <- upsamplefill(diag(2), rep(-1, 3))


gjmvanboxtel/gsignal documentation built on Nov. 22, 2023, 8:19 p.m.