R/locallyUnique.R

setMethodS3("locallyUnique", "default", function(x, ...) {
  n <- length(x)
  if (n < 2)
    return(x)
  ok <- c(TRUE, (x[-n] != x[-1]))
  x[ok]
})
HenrikBengtsson/aroma.core documentation built on Feb. 20, 2024, 9:17 p.m.