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
654 stars 133 forks source link

Large degrees of freedom displayed with comma #559

Closed Fritz-theCat closed 1 year ago

Fritz-theCat commented 1 year ago

Hello, I noticed that degrees of freedom are rendered with commas separating figures of 1000 or more. This is correct behavior for general numbers, but degrees of freedom are specifically excepted from the rule (https://apastyle.apa.org/instructional-aids/numbers-statistics-guide.pdf). I am unsure if this is new in APA 7 and will be solved in future updates.

dat <- data.frame(a = rnorm(20000, 5, 3),
                  b = rnorm(20000, 4, 4))
test <- t.test(dat$a, dat$b)
apa_test <- papaja::apa_print(test)
apa_test$statistic

I would be happy if anyone could help me with a workaround. Best, Fritz

crsh commented 1 year ago

Hi Fritz, thanks for getting in touch. Indeed, this needs to be corrected. Thanks for pointing it out!