Description Usage Arguments Value Examples
View source: R/GetStartEndIndices.R
Give all start and end indices of continuous subsequeces of
value
inside vector x
1 | GetStartEndIndices(x, value = TRUE)
|
x |
a vector of any given length and mode, e.g. "logical", "integer",
"numeric" etc, from which to find the index of |
value |
an element to search for |
A list of two vectors
start
contains the start indices of continuous subsequeces of
value
inside vector x
end
contains the end indices of continuous subsequeces of
value
inside vector x
1 2 3 4 5 6 | x <- c(T, T)
GetStartEndIndices(x, T)
x <- c(F, F, T, F, T, T, T, F)
GetStartEndIndices(x, T)
x <- c(1, 1, 2, 3, 4, 1, 1, 1)
GetStartEndIndices(x, 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.