【问题标题】:apa_table() returns a blank result while the table appears at the end of the pdf file当表格出现在 pdf 文件的末尾时,apa_table() 返回空白结果
【发布时间】: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


    【解决方案1】:

    答案很简单,我必须在我的文档的 YAML 元数据中更改一个选项。

    这个: 浮动文本:没有

    到这里:

    floatsintext:是的

    【讨论】:

      猜你喜欢
      • 2014-05-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-26
      • 1970-01-01
      • 1970-01-01
      • 2019-03-31
      相关资源
      最近更新 更多