crsh / papaja

papaja (Preparing APA Journal Articles) is an R package that provides document formats to produce complete APA manuscripts from RMarkdown-files (PDF and Word documents) and helper functions that facilitate reporting statistics, tables, and plots.
https://frederikaust.com/papaja_man/
Other
657 stars 133 forks source link

apa_print() cannot parse binom.test() output #576

Closed crsh closed 10 months ago

crsh commented 10 months ago

Describe the bug The ouput of binom.test() can no longer be processed by apa_print() because the lookup tables cannot deal with the names pulled from the column names attributes.

To Reproduce

binom.test(10, 20) |>
  papaja::apa_print()
$estimate
NULL

$statistic
NULL

$full_result
NULL

$table
A data.frame with 2 labelled columns:

      conf.int p.value
1 [0.27, 0.73]  > .999

conf.int: 95\\% CI 
p.value : $p$ 
attr(,"class")
[1] "apa_results" "list"       
Warnmeldung:
In canonize(y) :
  Some columns could not be renamed: 'number.of.successes', 'number.of.trials', 'probability.of.success'
This implies that your output object was not fully understood by `apa_print()`.
  Therefore, be careful when using its output. Moreover, please visit https://github.com/crsh/papaja/issues and
  file an issue together with the code that generated the output object. In doing so, you help us to fully
  support the type of analysis you just conducted and make papaja a little bit better.

Expected behavior The function should return a complete apa_results-object.

Any idea what's going on here, @mariusbarth?