File: print.multcompLetters.R

package info (click to toggle)
r-cran-multcompview 0.1-10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 268 kB
  • sloc: makefile: 2
file content (41 lines) | stat: -rw-r--r-- 1,137 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#' print a multcompLetters object
#' 
#' print method for an object of class 'multcompLetters'.
#' 
#' Prints only the Letters component of the 'multcompLetters' list unless
#' all=TRUE.
#' 
#' @param x an object of class 'multcompLetters'
#' @param all FALSE to print only the character vector representations of the
#' 'multcompLetters' comparison summary; TRUE to print also the matrix
#' representation.
#' @param ...  Other optional print parameters as described on the
#' \code{\link{print}} help page.
#' @return the named, character vector representation of the
#' 'multcompLetters' evaluation of the distance relationships
#' @author Spencer Graves
#' @seealso \code{\link{multcompLetters}}
#' @keywords dplot
#' @export
#' @examples
#' 
#' dif3 <- c(FALSE, FALSE, TRUE)
#' names(dif3) <- c("A-B", "A-C", "B-C")
#' dif3L <- multcompLetters(dif3)
#' dif3L
#' print(dif3L)
#' print(dif3L, TRUE)
#' 
"print.multcompLetters" <-
function(x, all=FALSE, ...){
  {
    if(all){
      class(x) <- NULL
      print(x, ...)
    }
    else 
      print(x$Letters, ...)
  }
  invisible(x$Letters)
}