R/summary.ahpgaussian.R

Defines functions summary.ahpgaussian

Documented in summary.ahpgaussian

#' @importFrom methods setRefClass new
#' @importFrom reshape2 melt dcast
#' @importFrom graphics barplot text
#' @importFrom stats ave reorder sd
#' @docType package
#' @name summary.ahpgaussian
#' @export

summary.ahpgaussian <- function(object,
                                presentation=FALSE, ...)
{
  if (!inherits(object, 'ahpgaussian'))
    stop("Use this function only with 'ahpgaussian' class!")

  if(!presentation){

    d <- length(object$number)

    x <- list('Table1' = object$table1,
              'Table2' = object$table2,
              'Table3' = object$table3)
    class(x) <- c('summary.ahpgaussian', 'listof')

    x

  } else {

    d <- length(object$number)

    cat(' Table 1:\t\t\t\t',
        object$table1)
    cat('\n  - Table 2:\t\t\t\t',
        object$table2)
    cat('\n  - Table 3:\t\t\t\t',
        object$table3)

    cat('\n')
  }
}

Try the AHPGaussian package in your browser

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

AHPGaussian documentation built on July 9, 2023, 7:40 p.m.