我正在使用R中的官员包来将我的绘图作为输出转移到功率点演示.
每次运行代码时,我都要确保pptx中没有要保存我的图的幻灯片.
现在我知道如何从演示文稿中删除单个幻灯片.但我不知道如何一次删除所有幻灯片.
到目前为止我的代码是:
library(officer)
# reading template slides and adding slide in which I want my plot
doc <- read_pptx("U://30-Power & Water//25 Renewables//WORK//Config//Templates//Template.pptx")
doc <- add_slide(doc, layout = "Title and Content",master = "Office Theme")
doc <- ph_with_gg(doc, value = Sweihan ) #plot = ggplot
# Reading the output slides and removing slides (it is just removing one slide so far)
output <- read_pptx("U://30-Power & Water//25 Renewables//WORK//Result//Result.pptx")
output <- remove_slide(output)
print(output, target = "U://30-Power & Water//25 Renewables//WORK//Result//Result.pptx" ) %>% invisible() …Run Code Online (Sandbox Code Playgroud) 我正在使用officerR中的程序包将地块转移到演示文稿中。
可以使用ph_with_gg()函数来传输ggplot,但是传递普通R图的功能是什么?我在软件包中找不到任何此类功能。
这些是我所引用的一些资源:
您的帮助将不胜感激!
问候
I am trying to make a heatmap in R, that along with the fill should also show the values and along with filling, should also include a row and column without applying fill on them.
My data looks like this
Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Sum
1999 116 127 202 229 253 271 271 245 212 174 133 115 2348
2000 114 154 193 214 263 271 254 248 210 167 120 …Run Code Online (Sandbox Code Playgroud)