fullPTable: Convert a lower triangle matrix to a full matrix

View source: R/fullPTable.r

fullPTableR Documentation

Convert a lower triangle matrix to a full matrix

Description

Converts a lower triangle matrix to a full matrix.

Usage

fullPTable(PT)

Arguments

PT

A lower triangle matrix.

Details

This function is useful to convert a lower triangle matrix of p-values from a pairwise test to a full matrix. A full matrix can be passed to multcompLetters in the multcompView package to produce a compact letter display.

Value

A full matrix.

Author(s)

Salvatore Mangiafico, mangiafico@njaes.rutgers.edu

References

https://rcompanion.org/handbook/F_08.html

See Also

cldList

Examples

### Example with pairwise.wilcox.test
data(BrendonSmall)
BrendonSmall$Instructor = factor(BrendonSmall$Instructor,
                          levels = c('Brendon Small', 'Jason Penopolis',
                                     'Paula Small', 'Melissa Robbins', 
                                     'Coach McGuirk'))
P   = pairwise.wilcox.test(x = BrendonSmall$Score, g = BrendonSmall$Instructor)
PT  = P$p.value
PT
PT1 = fullPTable(PT)
PT1
library(multcompView)
multcompLetters(PT1)


rcompanion documentation built on May 29, 2024, 8:42 a.m.