Pretty print sql code from separate file with knitr

前端 未结 1 1125
小鲜肉
小鲜肉 2020-12-30 04:09

Knitr produces a nice, syntax highlighted code when using a code chunk as below.

```sql
SELECT column
FROM table
```

Is it possible to achi

相关标签:
1条回答
  • 2020-12-30 04:30

    I think you can use an inline R expression to achieve it:

    ```sql
    `r xfun::file_string('mycode.sql')`
    ```
    
    0 讨论(0)
提交回复
热议问题