在RMarkdown中生成APA文本表

时间:2018-06-08 21:48:46

标签: r-markdown

我正在尝试为研究提案生成此文本表。我在RMarkdown中写作并使用papaja插件获取APA6样式并使用此命令生成PDF:

rmarkdown::render("appendix.Rmd")

此表格将包含在横向模式中。 (我使用MS Word创建了这个版本。)我可以使用任何软件包或方法。

enter image description here

2 个答案:

答案 0 :(得分:1)

如果表的内容位于data.frame中,则papaja的{​​{1}}可以生成横向LaTeX表:

apa_table()

答案 1 :(得分:0)

我最终使用了乳胶。我注意到有一个可用于将其转换为横向模式的程序包,但决定改用纵向格式。

\begin{table}[]
\centering
\caption{Decision factors and operationalizations.}
\label{my-label}
\begin{tabular}{p{.18\linewidth}p{.1\linewidth}p{.72\linewidth}}
\hline
 & Level & Operationalization \\ \hline
Expected return & High & The startup is expected to return 10x. \\
 & Low & The startup is expected to return 5x. \\
Expected time horizon & High & A liquidity event is expected in 5-10 years. 
\\
 & Low & A liquidity event is expected in 2-3 years. \\
Coinvestment & High & The investment will be made with other well-regarded 
investors. \\
 & Low & The investment will be made alone. \\
Participation & High & The investment will be an active investment with 
direct interaction with the founder. \\
 & Low & The investment will be a passive investment with no interaction with 
the founder. \\
Social impact & High & The startup is building a product that could have a 
significant positive impact on society. \\
 & Low & The startup is building an interesting product. \\
Investment size & High & The minimum investment required to participate is 
large. \\
 & Low & The minimum investment required to participate is small. \\
Entrepreneurial personality & High & The founder is charismatic, self- 
confident, hard-working, but appears set in their plans and maintains a 
cordial demeanor. \\
 & Low & The founder does not exhibit any particular personality traits that 
stand out, positively or negatively. \\ \hline
\end{tabular}
\end{table}