如何在rmarkdown中编织html时为双方证明文本的合理性

时间:2017-04-05 05:00:25

标签: html r-markdown

---
title: '1'
author: "A"
date: "April 4, 2017"
output: html_document
---

      Figure 3 includes the residual plot and QQ-plot. The residual plot have no obvious pattern: the expect value of residuals is close to 0 and the variances are approximately equal. The QQ-plot shows the standardized residuals are close to the theoretical quantiles. Thus, **the residuals are normally distributed and homoscedastic, and the assumption of the liner model is satisfied**. The VIF values for each variable in the best model is small, indicating **there are no obvious multicolinearity**.

例如,使用上面的代码,如图所示,默认情况下第二行和第三行与左边对齐。

enter image description here

如果我想与双方对齐,我该怎么办? (注意:不要与中心对齐!)

Text Justification in Rmarkdown word document为单词输出案例提供了解决方案,但我还没有为html案例找到一个很好的参考。

1 个答案:

答案 0 :(得分:8)

只需在YAML之后覆盖对齐:

---
title: '1'
author: "A"
date: "April 4, 2017"
output: html_document
---

<style>
body {
text-align: justify}
</style>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Figure 3 includes the residual plot and QQ-plot. The residual plot have no obvious pattern: the expect value of residuals is close to 0 and the variances are approximately equal. The QQ-plot shows the standardized residuals are close to the theoretical quantiles. Thus, **the residuals are normally distributed and homoscedastic, and the assumption of the liner model is satisfied**. The VIF values for each variable in the best model is small, indicating **there are no obvious multicolinearity**.

归功于Guilherme Parreira,here