【问题标题】:Trying to export graphics from R (ggplot2) to powerpoint尝试将图形从 R (ggplot2) 导出到 powerpoint
【发布时间】:2018-08-22 13:13:53
【问题描述】:

有人能解释一下为什么在许多通信中提到的包“ReporteRs”作为进行此类导出的包不再可用吗?什么是替代品?我读到了一个关于替代方案的提及:“officer”,但我找不到它。非常感谢您的帮助 。斧头

【问题讨论】:

标签: reporting reporters


【解决方案1】:

如果您想将 R 图表导出到 Powerpoint,您还可以使用基于 CRAN 刚刚推出的 officer 构建的包装器包 export,请参阅 https://cran.r-project.org/web/packages/export/index.html 和演示 https://github.com/tomwenseleers/export

典型的语法很简单,例如:

install.packages("export")
library(export)
library(ggplot2)
qplot(Sepal.Length, Petal.Length, data = iris, color = Species, 
      size = Petal.Width, alpha = I(0.7))     
graph2ppt(file="ggplot2_plot.pptx", width=6, height=5) 

您还可以使用它导出到 Word、Excel、Latex 或 HTML,还可以使用它导出各种 R stats 对象的统计输出。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-05
    • 1970-01-01
    • 2021-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多