如何更改papaja :: apa_print中的十进制标记?
我想使用papaja :: apa_print()
使我的报告更容易,但是我需要调整语言的APA样式适应的输出。这意味着显示领先的零并将逗号设置为十进制标记。大多数papaja
函数的大多数不是问题,而是apa_print()
并不是那么简单。
library(papaja)
model <- lm(Sepal.Length ~ Species, data = iris)
anova(model) |> apa_print(decimal.mark = ",", gt1 = TRUE)
这些选项应用于大多数输出,但不适用于p值和F-Ratios(至少在ANOVA中)。我认为它可能适用于输出的所有乳胶部分,但ETA方似乎还可以。我相信这可能是一个错误。那么我该如何处理呢?我应该将其报告为错误吗?输出的一部分供参考:
$estimate
$estimate$Species
[1] "$\\hat{\\eta}^2_G = 0,401$, 90\\% CI $[0,300, 0,485]$"
$statistic
$statistic$Species
[1] "$F(2, 147) = 49.16$, $p < .001$"
$full_result
$full_result$Species
[1] "$F(2, 147) = 49.16$, $p < .001$, $\\hat{\\eta}^2_G = 0,401$, 90\\% CI $[0,300, 0,485]$"
$table
A data.frame with 7 labelled columns:
term estimate conf.int statistic df df.residual p.value
1 Species 0,401 [0,300, 0,485] 49.16 2 147 < .001
I wanted to use papaja::apa_print()
to make things easier in my report but I need to adjust the output for my language's APA style adaptation. It means displaying leading zeros and setting comma as the decimal mark. It's not a problem with most of papaja
functions but with apa_print()
is not that straightforward.
library(papaja)
model <- lm(Sepal.Length ~ Species, data = iris)
anova(model) |> apa_print(decimal.mark = ",", gt1 = TRUE)
The options are applied to most of the output but not to p-values and F-ratios (at least in ANOVA). I thought it might apply to all LaTeX parts of the output but eta-squared seems to be OK. I believe it might be a bug. So how do I deal with it? Should I report it as a bug? Part of the output for reference:
$estimate
$estimate$Species
[1] "$\\hat{\\eta}^2_G = 0,401$, 90\\% CI $[0,300, 0,485]quot;
$statistic
$statistic$Species
[1] "$F(2, 147) = 49.16$, $p < .001quot;
$full_result
$full_result$Species
[1] "$F(2, 147) = 49.16$, $p < .001$, $\\hat{\\eta}^2_G = 0,401$, 90\\% CI $[0,300, 0,485]quot;
$table
A data.frame with 7 labelled columns:
term estimate conf.int statistic df df.residual p.value
1 Species 0,401 [0,300, 0,485] 49.16 2 147 < .001
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论