我正在尝试用 papaja/Rmarkdown 写一篇论文。我使用以下代码创建 APA 表:
descriptives <- mydata%>%
filter(!is.na(scores))%>%
group_by(class) %>%
summarize(
totalmean = mean(scores)
, totalsd = sd(scores)
, n.total = n())%>%
mutate(se.scores = totalsd / sqrt(n.total),
lower.ci.scores = totalmean - qt(1 - (0.05 / 2), n.total - 1) * se.scores,
upper.ci.scores = totalmean + qt(1 - (0.05 / 2), n.total - 1) * se.scores)
descriptives <- descriptives %>% rename("Total Score"= totalmean, SD= totalsd, N= n.total,SE = se.scores, "CI lower"=lower.ci.scores, "CI upper" = upper.ci.scores)
descriptives[, -1] <- printnum(descriptives[, -1])
apa_table(descriptives)
这个错误的有趣之处在于,虽然表格没有出现在 RStudio 或我论文 pdf 的正确部分中,但它在论文末尾列出,完全根据我的代码构建。
有什么建议么?