Learn R Programming

rcompanion (version 2.4.36)

fullPTable: Convert a lower triangle matrix to a full matrix

Description

Converts a lower triangle matrix to a full matrix.

Usage

fullPTable(PT)

Value

A full matrix.

Arguments

PT

A lower triangle matrix.

Author

Salvatore Mangiafico, mangiafico@njaes.rutgers.edu

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.

References

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

See Also

cldList

Examples

Run this code
### 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)

Run the code above in your browser using DataLab