R/print.results.R

Defines functions print.results

print.results <- function(x, ...)
{
  x<-x$output 
  n<-6
  if (dim(x)[2] > n) {
    prettydata <- data.frame(
      head(x)[,c(1:n)], rep('...',dim(head(x))[1])
    )
    colnames(prettydata)[(n+1)] <- '...'
    print (prettydata)
    cat("\nOnly the first few rows and columns are printed.\n")
  } else {
    print(head(x))
    cat("\nOnly the first few rows are printed.\n")
  }
}

Try the metabolomics package in your browser

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

metabolomics documentation built on May 29, 2017, 3:32 p.m.