R/summary.epplab.R

Defines functions summary.epplab

Documented in summary.epplab

#' Summarize an epplab Object
#' 
#' Summarizes and prints an \code{epplab} object in an informative way.
#' 
#' The option \code{which} can restrict the output to certain simulation runs.
#' In case of many simulations, this might improve the readability.
#' 
#' @name summary.epplab
#' @aliases summary.epplab summary-method summary,epplab-method
#' @docType methods
#' @param object Object of class \code{epplab}.
#' @param which Summary for \code{which} simulation runs
#' @param digits Number of displayed decimal digits
#' @param ... Additional parameters
#' @author Daniel Fischer
#' @keywords methods print
#' @examples
#' 
#' library(tourr)
#' data(olive)
#' res <- EPPlab(olive[,3:10],PPalg="PSO",PPindex="KurtosisMin",n.simu=10, maxiter=20)
#' summary(res)
#' 
#' @export
summary.epplab <- function(object, which=1:10, digits=4, ...){
  which <- which[which<=length(object$PPindexVal)]
  cat("REPPlab Summary\n")
  cat("---------------\n")
  cat("Index name       :",object$PPindex,"\n")
  cat("Index values     :",round(object$PPindexVal[which],digits=digits),"\n")
  cat("Algorithm used   :",object$PPalg,"\n")
  cat("Sphered          :",object$sphered,"\n")
  cat("Iterations       :",object$PPiter[which],"\n")
  invisible(object)
} 

Try the REPPlab package in your browser

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

REPPlab documentation built on May 2, 2019, 8:58 a.m.