问题描述
我正在尝试用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的正确部分中,而是根据我的代码完美构造在该论文的末尾。
有什么建议吗?
解决方法
答案很简单,我不得不在文档的YAML元数据中更改一个选项。
此: floatsintext:否
对此:
floatsintext:是