View source: R/3_1Create_large_gaps.R
| gapCreation | R Documentation |
This function creates a large continuous gap within a univariate signal. Gap size is defined as a percentage of input vector length. By default, the created gap starts at a random location.
gapCreation(X, rate, begin = NULL)
X |
input vector |
rate |
size of desired gap, as a percentage of input vector size |
begin |
location of the beginning of the gap (random by default) |
A list containing the following elements:
output_vector |
Output vector containing the created gap. |
input_vector |
Original vector used as input. |
begin_gap |
Index of the beginning of the gap. |
rate |
Size of the created gap as a percentage of the input vector length. |
gap_size |
Length of the created gap. |
data(dataDTWBI)
X <- dataDTWBI[, 1]
rate <- 0.1
output <- gapCreation(X, rate)
plot(output$input_vector, type = "l", col = "red", lwd = 2)
lines(output$output_vector, lty = "dashed", lwd = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.