小编Jaw*_*ria的帖子

使用R中的官员包删除演示文稿的幻灯片

我正在使用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)

r officer

4
推荐指数
1
解决办法
377
查看次数

官包功能,用于向演示文稿添加R图

我正在使用officerR中的程序包将地块转移到演示文稿中。

可以使用ph_with_gg()函数来传输ggplot,但是传递普通R图的功能是什么?我在软件包中找不到任何此类功能。

这些是我所引用的一些资源:

军官CRAN包

PowerPoint演示文稿生成

您的帮助将不胜感激!

问候

plot powerpoint r ggplot2 officer

3
推荐指数
1
解决办法
1116
查看次数

heatmap with values and some additional features in 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)

r fill heatmap ggplot2 dataframe

0
推荐指数
1
解决办法
1243
查看次数

标签 统计

r ×3

ggplot2 ×2

officer ×2

dataframe ×1

fill ×1

heatmap ×1

plot ×1

powerpoint ×1