R MARKDOWN演示:每张幻灯片中显示一个图
我有300个图的列表,希望一个PowerPoint幻灯片显示一个图(300个幻灯片)。实现这一目标的最佳方法是什么?
一个玩具示例,使用内置的IRIS数据集创建一个曲线列表:
purrr::map(names(iris[,-5]), function(col_name){
plot = iris %>%
ggplot(aes(x = !!as.name(col_name))) +
geom_histogram()
return(plot)
})
我希望在每个幻灯片上创建一个图块。
I have a list of 300 plots and want one PowerPoint slide to show one plot (300 slides). What's the best way to achieve this?
A toy example using the built-in iris dataset to create a list of plots:
purrr::map(names(iris[,-5]), function(col_name){
plot = iris %>%
ggplot(aes(x = !!as.name(col_name))) +
geom_histogram()
return(plot)
})
I hope to create PowerPoint slides with one plot on each slide.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将使用
iris
数据集,该数据集通常用于填充示例代码。使用RMD文件中的以下代码:
键入“针织”按钮后,您将看到PowerPoint演示文稿出现,并带有以下布局:
请让我知道,这是什么你想要。
I will be using the
iris
data set, which is a built-in data set often used to populate example code.With the following code in a Rmd file:
And after hitting the "knit" button, you will see a PowerPoint presentation appearing, with the following lay-out:
Please let me know, whether this is what you wanted.