我正在用Markdown編寫一本小練習冊。我希望將最後的輸出與列上的圖表和文檔文本相關聯。類似的問題被解決here和here。不幸的是,他們主要希望每列有一個輸出。我想在一列上生成輸出,在另一列上生成文本。真正有趣的是Docco,但它顯示了文本的代碼輸出。Markdown中的文本和代碼/輸出的單獨列
一個可能的解決方案是RPres減價橫向規則:使用***
,它創建了兩個易於使用的列。但是我確實在Markdown文檔中找到了有關它的實現的文檔。
這裏顯示到目前爲止我的結果中的圖片和我的代碼示例:
```{r setoption, cache=TRUE, warning=FALSE, message=FALSE, fig.width=12}
knitr::opts_chunk$set(cache=TRUE, warning=FALSE, message=FALSE, fig.width=4, echo = FALSE)
```
```{r, loadlibraries}
library(knitr)
library(lattice)
```
### Exercise 1 - 22/4/'16
Is the data set shown in the following figure symmetric or skewed? How many modes does this data set have?
```{r 1.1}
e1 <- rep(seq(1, 6, 1), c(6, 4, 2, 2, 4, 6))
barchart(table(e1), horizontal = FALSE, xlab = "", ylab = "Frequency")
```
**Solution:**
The data set is symmetric. Furthermore, it has two modes.
### Exercise 2 - 22/4/'16
Describe the shape of the dataset shown in the following figure.
```{r 2.1}
e2 <- rep(seq(1, 9, 1), c(6, 5, 4, 3, 2, 1, 1, 1, 1))
barchart(table(e2), ylab = "Frequency", horizontal = FALSE)
```
**Solution:**
The dataset is right skewed, also said right skewed, with one mode.
你可能想要[這個反向](http://yihui.name/knitr/demo/graphics/)? –
是的,類似的東西。 – Worice