How do I create a table showing the p values from a holm post hoc in R?

47 Views Asked by At

In my data set I have 14 things I'm comparing to one another in a post hoc test. Ideally I will be able to produce a table that looks like this

where within each cell is the p value from the post hoc analysis. I completed the analysis in another software (JASP) but the data it outputs is messy.

I could just copy and paste the results from the JASP analysis into an excel document but that would take too long as I have to make several tables like this.

Compound    Compared to pholm
NL  NT  < .001
    AL-39   < .001
    AL-49   < .001
    AL-61   0.284
    AL-53   < .001
    AL-72   1
    AL-80   < .001
    AL-91   < .001
    NA  < .001
    DHNL    < .001
    AL-86   0.007
    DEET    < .001
    AL-103  < .001
    AL-4    < .001
    AL-6    < .001
NT  AL-39   < .001
    AL-49   < .001
    AL-61   0.003
    AL-53   < .001
    AL-72   < .001
    AL-80   0.992
    AL-91   0.011
    NA  < .001
    DHNL    0.184
    AL-86   0.175
    DEET    < .001
    AL-103  0.007
    AL-4    < .001
    AL-6    < .001
AL-39   AL-49   1
    AL-61   < .001
    AL-53   < .001
    AL-72   < .001
    AL-80   < .001
    AL-91   1
    NA  < .001
    DHNL    0.992
    AL-86   < .001
    DEET    1
    AL-103  1
    AL-4    1
    AL-6    < .001
AL-49   AL-61   < .001
    AL-53   < .001
    AL-72   < .001
    AL-80   < .001
    AL-91   1
    NA  < .001
    DHNL    0.279
    AL-86   < .001
    DEET    1
    AL-103  1
    AL-4    1
    AL-6    < .001
AL-61   AL-53   < .001
    AL-72   0.006
    AL-80   1
    AL-91   < .001
    NA  < .001
    DHNL    < .001
    AL-86   1
    DEET    < .001
    AL-103  < .001
    AL-4    < .001
    AL-6    < .001
AL-53   AL-72   < .001
    AL-80   < .001
    AL-91   < .001
    NA  1
    DHNL    < .001
    AL-86   < .001
    DEET    < .001
    AL-103  < .001
    AL-4    < .001
    AL-6    1
AL-72   AL-80   < .001
    AL-91   < .001
    NA  < .001
    DHNL    < .001
    AL-86   < .001
    DEET    < .001
    AL-103  < .001
    AL-4    < .001
    AL-6    < .001
AL-80   AL-91   < .001
    NA  < .001
    DHNL    < .001
    AL-86   1
    DEET    < .001
    AL-103  < .001
    AL-4    < .001
    AL-6    < .001
AL-91   NA  < .001
    DHNL    1
    AL-86   < .001
    DEET    0.269
    AL-103  1
    AL-4    0.797
    AL-6    < .001
NA  DHNL    < .001
    AL-86   < .001
    DEET    < .001
    AL-103  < .001
    AL-4    < .001
    AL-6    1
DHNL    AL-86   < .001
    DEET    0.017
    AL-103  1
    AL-4    0.082
    AL-6    < .001
AL-86   DEET    < .001
    AL-103  < .001
    AL-4    < .001
    AL-6    < .001
DEET    AL-103  0.326
    AL-4    1
    AL-6    < .001
AL-103  AL-4    0.992
    AL-6    < .001
AL-4    AL-6    < .001

0

There are 0 best solutions below