Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/80.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
如何使用RMarkdown更改html中rChart Iframe的维度?_Html_R_Iframe_R Markdown_Rcharts - Fatal编程技术网

如何使用RMarkdown更改html中rChart Iframe的维度?

如何使用RMarkdown更改html中rChart Iframe的维度?,html,r,iframe,r-markdown,rcharts,Html,R,Iframe,R Markdown,Rcharts,我试图将基于nvd3库的rchart合并到由RMarkdown生成的html文档中。但是我无法调整html文档中生成的iframe的高度。 因此,我的情节只有一半是可见的。使用R?有解决这个问题的方法吗?。我不知道任何html或css。这是我的代码块生成的情节 ```{r, echo=FALSE,results='asis',comment=NA} library(rCharts) hair_eye_male <- subset(as.data.frame(HairEyeColor), S

我试图将基于nvd3库的rchart合并到由RMarkdown生成的html文档中。但是我无法调整html文档中生成的iframe的高度。 因此,我的情节只有一半是可见的。使用R?有解决这个问题的方法吗?。我不知道任何html或css。这是我的代码块生成的情节

```{r, echo=FALSE,results='asis',comment=NA}
library(rCharts)
hair_eye_male <- subset(as.data.frame(HairEyeColor), Sex == "Male")
n1 <- nPlot(Freq ~ Hair, group = "Eye", data = hair_eye_male, type = "multiBarChart")
n1$show("iframesrc",cdn=TRUE)
```
`{r,echo=FALSE,results=asis,comment=NA}
图书馆(艺术)

hair_eye_male未经测试,但我开始设计一种基于rCharts在中提供的参数的解决方案。在我这边效果很好。如果您想尝试,可以开发工具::安装_github(“timelyportfolio/rCharts@iframe_config_size)下面是具体的更改
iframe
可以使用CSS设置样式。如果您希望它更大,请添加
iframe.rChart{height:600px;width:800px}
。@timelyportfolio非常感谢。不过我还没试过。