Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html stitch/Rstudio编译笔记本:修改默认的图宽、高度?_Html_R_Knitr_Rstudio_Figure - Fatal编程技术网

Html stitch/Rstudio编译笔记本:修改默认的图宽、高度?

Html stitch/Rstudio编译笔记本:修改默认的图宽、高度?,html,r,knitr,rstudio,figure,Html,R,Knitr,Rstudio,Figure,在RStudio中,compilenotebook功能非常方便,但我希望能够更改默认设置 给定.R脚本的图形全局宽度和高度。如何做到这一点呢?根据,目前有两种可能的笔记本类型。要实现您想要的,您必须选择类型knitr::spin,它允许您更改块选项;有关详细信息,请参阅 在这种情况下,您只需添加一个代码块来设置块选项,例如 #+ setup, include=FALSE library(knitr) opts_chunk$set(fig.width = 5, fig.height = 10)

在RStudio中,compilenotebook功能非常方便,但我希望能够更改默认设置 给定.R脚本的图形全局宽度和高度。如何做到这一点呢?

根据,目前有两种可能的笔记本类型。要实现您想要的,您必须选择类型
knitr::spin
,它允许您更改块选项;有关详细信息,请参阅

在这种情况下,您只需添加一个代码块来设置块选项,例如

#+ setup, include=FALSE
library(knitr)
opts_chunk$set(fig.width = 5, fig.height = 10)

#' write the rest of your code
1 + 1
rnorm(10)
plot(cars)

根据,目前有两种可能的笔记本类型。要实现您想要的,您必须选择类型
knitr::spin
,它允许您更改块选项;有关详细信息,请参阅

在这种情况下,您只需添加一个代码块来设置块选项,例如

#+ setup, include=FALSE
library(knitr)
opts_chunk$set(fig.width = 5, fig.height = 10)

#' write the rest of your code
1 + 1
rnorm(10)
plot(cars)

这就是我缺少的--如何使用标记注释来设置块选项。这就是我缺少的--如何使用标记注释来设置块选项。