R/cutSenspe.R

cutSenspe <- function(res, cut.point){
  cut.point <- quantile(res[,"cut"], cut.point)
  res <- res[order(res[,"cut"]),]
  res <- sapply(cut.point, function(cut.point){
    ind <- which(res[,"cut"] > cut.point)[1]
    colMeans( res[ind+ c(-1,0), ] )
  })
  t(res)
}

Try the rcure package in your browser

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

rcure documentation built on May 2, 2019, 7:01 a.m.