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)
}

Try the MALDIquant package in your browser

Any scripts or data that you put into this service are public.

MALDIquant documentation built on March 31, 2023, 10:40 p.m.