Use hooks to format table in output

前端 未结 4 1177
情话喂你
情话喂你 2020-12-20 14:08

Using knitr and R Markdown, I can produce a tabularised output from a matrix using the following command:

```{r results=\'asis\'}
kable(head(x))
```
<         


        
4条回答
  •  再見小時候
    2020-12-20 14:34

    Nowadays one can set df_print in the YAML header:

    ---
    output:
      html_document:
        df_print: kable  
    ---
    
    ```{r}
    head(iris)
    ```
    

提交回复
热议问题