r - 在 R Markdown 演示文稿中设置显示代码块的宽度
问题描述
我想为 R Markdown 演示文稿中显示的代码块设置宽度。在我在下面放置的简单示例中,代码行在ggplot(df, aes(x = time, y = value)) +
演示文稿中包含在两行中。我的目标是:
- (主要)让它没有被包裹起来,
- 理想情况下,使用幻灯片宽度百分比 (%) 为显示的代码块设置宽度。
R Markrdown 代码:
Presentation title
========================================================
author: Marta
date: February 9, 2019
autosize: true
Simple plot
==========================
<small><small><small>
```{r, fig.width = 10, fig.height = 5}
## Make some foo data frame
df <- data.frame(time = 1:10, value = rnorm(10))
## Plot
library(ggplot2)
ggplot(df, aes(x = time, y = value)) +
geom_point() +
geom_line()
```
</small></small></small>
呈现的演示文稿的幻灯片屏幕截图:
解决方案
推荐阅读
- uima - Ruta- 缩写查找
- mysql - 选择field_A与某个field_B值的field_A值匹配的记录的SQL代码
- javascript - Chrome浏览器颜色虚线bug
- java - 有没有办法发送地图
通过休息服务? - php - How to get values using post method
- ruby-on-rails - 对 user_id 强制过滤
- python - 将新的文本数据写入文本文件而不覆盖python中的先前数据
- vue.js - 窗口未定义 vuejs 和 vuetify SSR
- c# - How to allow an empty request body for a reference type parameter?
- flask - Run RASA with flask