Learn R Programming

FSMUMI (version 1.0)

Creating_gap_univariate: Creating a gap in a univariate series

Description

This function creates a gap (successive missing values) within a univariate signal. The size of gap is defined as a percentage of input vector length. By default, the starting position of the gap is chosen randomly.

Usage

Creating_gap_univariate(X, rate, begin = NULL)

Arguments

X

input vector

rate

size of desired gap, as a percentage of input vector size

begin

the begining position of the gap (random by default)

Value

This function returns a series with a gap of defined size.

Examples

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

Run the code above in your browser using DataLab