默认情况下不适合幻灯片,甚至不通过任何其他方式打印.
这是.Rmd:编辑:似乎你必须在每个块中使用plot().第二个图现在打印.
# Plot should show at high resolution
```{r echo=FALSE, comment = ""}
# load some data
require(plyr)
rbi <- ddply(baseball, .(year), summarise,
mean_rbi = mean(rbi, na.rm = TRUE))
```
```{r}
# plot
plot(mean_rbi ~ year, type = "l", data = rbi)
```
# Second attempt
```{r, fig.width = 2, fig.height = 2}
plot(mean_rbi ~ year, type = "l", data = rbi)
```
# Third attempt
```{r, out.width = 2, out.height = 2}
plot(mean_rbi ~ year, type = …Run Code Online (Sandbox Code Playgroud)