sections | R Documentation |
Identify sections of a vector that have the same consecutive value
sections(x, buffer = 0)
x |
numeric vector |
buffer |
value compared with difference between consecutive values. If the absolute difference exceeds the buffer, the values are considered different and not part of the same section. |
Nikolai Klibansky
## Not run:
x <- sample(c(1,0),100,replace=TRUE)
sections(x=x)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.