papaja icon indicating copy to clipboard operation
papaja copied to clipboard

Replace some text with unicode in print.apa_results_table()

Open mariusbarth opened this issue 1 year ago • 0 comments

For complex models with higher-order interactions, the output from apa_print() sometimes becomes rather unwieldy. I am wondering if it would be a good idea to print() interaction terms after replacing "$\times$" with the corresponding unicode character. This is what something like that would look like:

$table
A data.frame with 7 labelled columns:

                                                                  term estimate     conf.int statistic   df df.residual p.value
1                                                             Material     .042 [.000, .131]     11.48    1          87    .001
2                                                         Instructions     .006 [.000, .061]      1.66    1          87    .201
3                                                           Block pair     .090 [.047, .123]     26.60 5.11      444.99  < .001
4                                         Stimulus location regularity     .145 [.049, .261]    142.70    1          87  < .001
5                                              Material x Instructions     .003 [.000, .047]      0.68    1          87    .413
6                                                Material x Block pair     .011 [.000, .019]      3.06 5.11      444.99    .010
7                                            Instructions x Block pair     .006 [.000, .007]      1.50 5.11      444.99    .188
8                              Material x Stimulus location regularity     .064 [.006, .162]     57.59    1          87  < .001
9                          Instructions x Stimulus location regularity     .002 [.000, .045]      1.86    1          87    .176
10                           Block pair x Stimulus location regularity     .005 [.000, .006]      1.86 5.10      443.28    .098
11                                Material x Instructions x Block pair     .005 [.000, .005]      1.28 5.11      444.99    .271
12              Material x Instructions x Stimulus location regularity     .000 [.000, .023]      0.29    1          87    .592
13                Material x Block pair x Stimulus location regularity     .003 [.000, .001]      1.25 5.10      443.28    .286
14            Instructions x Block pair x Stimulus location regularity     .002 [.000, .000]      0.60 5.10      443.28    .706
15 Material x Instructions x Block pair x Stimulus location regularity     .002 [.000, .000]      0.73 5.10      443.28    .604

I think this is a design decision. We usually print exactly what is "in" the object, and I think for expert users this might be the best choice. On the other hand, getting beautiful output in the console is also something to like.

mariusbarth avatar Apr 13 '23 13:04 mariusbarth