R/TopList.R

Defines functions TopList

Documented in TopList

TopList <- function(object, topnum=10, sorted.by = c("RValue","PostMean","MLE","PVal"))  {
  ####  Example usage:
  ####  toplist(rvs,topnum=15,sorted.by="MLE")

  sorted.by <- match.arg(sorted.by)
  om <- object$main
  switch(sorted.by,
         RValue = head(om,topnum),
         PostMean = om[order(om$PM.rank)[1:topnum],],
         MLE = om[order(om$MLE.rank)[1:topnum],],
         PVal = om[order(om$PVal.rank)[1:topnum],])
}

Try the rvalues package in your browser

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

rvalues documentation built on March 11, 2021, 9:05 a.m.