【发布时间】:2020-12-11 10:53:18
【问题描述】:
我正在尝试用 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 的正确部分中,但它被列在了根据我的代码完美构建的论文末尾。
有什么建议吗?
【问题讨论】:
标签: r r-markdown papaja