Ras*_*sen 31 markdown r presentation rstudio knitr
使用knitr在Rstudio中进行演示我有一张只有一张图片的幻灯片,我想填写整个屏幕/幻灯片.我怎么做?
以下.Rpres文档的第二张幻灯片设置为2000x2000像素,但它仍然只填充屏幕的一小部分:
first slide
======
Slide with plot which I want to fill the whole screen
========================================================
title: false
```{r, echo=FALSE,out.height="2000px",out.width="2000px"}
plot(cars)
```
Run Code Online (Sandbox Code Playgroud)
这就是我的意思,当我写到图片没有"填满整个屏幕"时,红线被绘制在屏幕的未被图表填充的部分.

2016年11月更新
在Rstudio版本1.0.44中创建新演示文稿时选择"HTML Slidy",可以更轻松地控制大小.以下是我想要的全高清分辨率,非常简单:
---
title: "Untitled"
output: slidy_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
##
```{r pressure, fig.height=10, fig.width=19}
plot(pressure)
```
Run Code Online (Sandbox Code Playgroud)
oro*_*ola 42
以下是设置整体演示文稿大小的方法:http ://www.rstudio.com/ide/docs/presentations/displaying_and_distributing_presentations默认值非常小:960*700.
数字大小,输出大小和表示大小之间的相互作用是棘手的,我不是专家,但这似乎工作正常.经过一番乱搞后,这看起来还不错:
first slide
======
width: 1920
height: 1080
Slide with plot which I want to fill the whole screen
========================================================
title: false
```{r myplot,echo=FALSE,fig.width=8,fig.height=4.5,dpi=300,out.width="1920px",out.height="1080px"}
plot(cars)
```
Run Code Online (Sandbox Code Playgroud)