jtools icon indicating copy to clipboard operation
jtools copied to clipboard

Different tidy output for an object of class summary.glht when the package jtools is loaded

Open awcm0n opened this issue 2 years ago • 1 comments

An object of class summary.glht submitted to tidy() produces a tibble with different column names if the package jtools is loaded:

Without jtools:

> broom::tidy(o)
# A tibble: 4 × 6
  contrast      null.value estimate std.error statistic adj.p.value
  <chr>         <dbl>    <dbl>     <dbl>     <dbl>      <dbl>
1 mar_jun_2020      0  0.00496   0.00531     0.935 0.350     
2 jul_dec_2020      0 -0.0144    0.00315    -4.56  0.00000508
3 mar_junXnojob     0  0.0470    0.0405      1.16  0.246     
4 jul_decXnojob     0  0.0506    0.0226      2.24  0.0254  

With jtools:

> library(jtools)
> broom::tidy(o)
# A tibble: 4 × 6
  lhs             rhs estimate std.error statistic    p.value
  <chr>              <dbl>    <dbl>     <dbl>     <dbl>       <dbl>
1 mar_jun_2020           0  0.00496   0.00531     0.935  0.350     
2 jul_dec_2020           0 -0.0144    0.00315    -4.56   0.00000508
3 mar_junXnojob          0  0.0470    0.0405      1.16   0.246     
4 jul_decXnojob          0  0.0506    0.0226      2.24   0.0254    
> packageVersion("broom")
[1] ‘1.0.4’
> packageVersion("jtools")
[1] ‘2.2.1’

awcm0n avatar Jun 02 '23 22:06 awcm0n

Some additional context at https://github.com/tidymodels/broom/issues/1161#issuecomment-1577284354. :)

simonpcouch avatar Jun 05 '23 18:06 simonpcouch