ordered.clusters
determines if identical elements of a vector appear
in contiguous clusters, and returns TRUE
if the do and FALSE
otherwise.
ordered.clusters(id)
id | a vector |
---|
The function returns TRUE if the elements appear in contiguous clusters and FALSE otherwise
duplicated
x <- c(1, 1, 1, 2, 2, 3, 4, 1, 5, 5, 5) ordered.clusters(x)#> [1] FALSEordered.clusters(sort(x))#> [1] TRUEordered.clusters(x[order(x)])#> [1] TRUE