R/rfbaselineScale.R

Defines functions rfbaselineScale

Documented in rfbaselineScale

## rfbaselineScale.R
## compiled in this form: 28/Sept/06


rfbaselineScale <- function(r) {
  dfit <- density(r[r < 3.5*mad(r)])
  modus <- pmin(0,mean(dfit$x[which(dfit$y >= max(dfit$y))]))
  rr <- r[r<= modus] - modus
  rr <- c(rr, -rr)
  sd(rr)
} ## rfbaselineScale

Try the IDPmisc package in your browser

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

IDPmisc documentation built on Jan. 21, 2020, 5:06 p.m.