R/irregular-functions.R

Defines functions .irregularScore

## .irregularScore
##  calculate frequency of irregular data
##
## params:
##  x: double
##
## returns:
##  double, frequency of irregular data
##
.irregularScore <- function(x) {
  d <- diff(x)
  d <- d[-1L] < head(d, -1L)

  mean(d)
}
sgibb/MALDIquant documentation built on Jan. 26, 2024, 10:04 a.m.