Learn R Programming

FSMUMI (version 1.0)

Creating_gaps: Creating gaps in multivariate time series

Description

This function builds gaps (with the same size) in multivariate time series. The size of each gap is defined as a percentage of input data length. By default, the position of each gap is randomly chosen.

Usage

Creating_gaps(data, rate, ngaps, begin = NULL)

Arguments

data

input multivariate time series

rate

size of a gap, as a percentage of input time series size

ngaps

number of gaps to create on each signal

begin

the starting position of a gap (random by default)

Value

Creating_gaps returns a multivariate time series with one gap per signal.

Examples

Run this code
# NOT RUN {
data(dataFSMUMI)
X <- dataFSMUMI[1:5000,]; #reduction for demo
rate <- 0.1
ngaps <- 1
incompleted_signal <- Creating_gaps(X, rate,1)
# }

Run the code above in your browser using DataLab