r - 将 rmarkdown 部分转换为图像
问题描述
我有几个 rmarkdown 部分,每个混合文本、标记和代码块的只有几行,我想把它们变成图像。
我还没有找到好的解决方案。也许我现在需要接受 pdf 输出并进行后期处理?有人有更好的主意吗?
这将是 rmarkdown-code 的一个示例,我想将其转换为图像。
## Question 2
Please compute the *pearson correlation* between
`mtcars$mpg` and `mtcars$disp` and round it to two digits.
### Answer
```{r}
round(cor(mtcars$mpg, mtcars$disp), 2)
```
PS:我寻找像https://github.com/yonicd/carbonate这样的东西,但是对于渲染的 rmarkdown 而不是源代码。理想情况下,我将拥有大多数用于语法突出显示和控制 rmarkdown 文档输出的选项。
解决方案
推荐阅读
- javascript - 数组中的展开操作出错。TS1005:“,”预期。打字稿
- api - 唤醒时 Azure 应用服务的瓶颈
- testing - Is there a way to fake DateTime.now() in a Flutter test?
- reactjs - redux 状态改变但连接的组件没有更新,无法理解突变
- git - Git Remote Repo 显示冲突,但本地没有显示冲突
- python - Nested ndarray reshape
- ruby - 无法让 ruby 使用 Nokogiri 解析我的 XML
- python - 从连接对象的条目属性中提取的数据类型单个元素在python中代表什么?
- datagridview - 拖放和光标图像更改代码中的错误需要 C# 帮助
- python - TypeError:“numpy.ndarray”对象不可调用我该怎么办?