R:官员;尝试更改pptx中的正文字体大小时出错

R:官员;尝试更改pptx中的正文字体大小时出错,r,fonts,powerpoint,officer,R,Fonts,Powerpoint,Officer,使用R:officer包(R3.6.3)和这组代码行…尝试更改pptx幻灯片正文中的字体大小。等等 x = read_pptx() x = add_slide(x, layout = "Title and Content", master = "Office Theme") %>% ph_with( block_list(fpar(ftext(reportTitleLine1, prop = fp_text(font.size = 43, color = "black")))),

使用R:officer包(R3.6.3)和这组代码行…尝试更改pptx幻灯片正文中的字体大小。等等

x = read_pptx()
x = add_slide(x, layout = "Title and Content", master = "Office Theme") %>% 
ph_with( block_list(fpar(ftext(reportTitleLine1, prop = fp_text(font.size = 43, color = "black")))),
      location = ph_location_type(type = "title") )
好的,直到这里。那么

ph_with(block_list(fpar(ftext(driveStatsStr, prop = fp_text(font.size = 14, color = "black")))),
    location = ph_location_type(type = "body") )
生成错误消息:

Error in ph_with(block_list(fpar(ftext(driveStatsStr, prop = fp_text(font.size = 14,  : 
argument "value" is missing, with no default
driveStatDir包含:

driveStatsStr   = c(totalFileCountStr, totalFileVolumeStr, currentDriveStorage, currentDriveTotalStorage, currentDriveRemainStorageStr, estRemainingBackupsStr)
在哪里,

[1] "Total file count: 93,029 files"                    "Total file volume:  98 GB"                        
[3] "Current Drive C storage: 2.74 TB"                  "Drive C total capacity: 7.27 TB"                  
[5] "Remaining Drive C capacity: 4.53 TB"               "Estimated remaining back-ups to full-capacity: 46"
在pptx幻灯片中设置正文内容的字体大小有什么错


再见。

你忘了上一行后面的
%%>%
了吗?你好,斯文。非常感谢。你的意思是让我用%>%来终止ph_(block_list)(fpar(ftext(drivestatstr,prop=fp_text(font.size=14,color=“black”))),location=ph_location_type(type=“body”))来终止ph_吗?
ph_with
需要一个rpptx对象(x)。在标题部分中,您使用
%>%
满足了这一需求,这就是您不需要在其中添加x的原因。如果您不以%>%结束您的行,并尝试将该行放在正文中,则会出现此错误。所以,要么在你的行主体行中添加x,要么在你的前一行末尾添加管道。你忘记了前一行后面的
%%>
了吗?你好,斯文。非常感谢。你的意思是让我用%>%来终止ph_(block_list)(fpar(ftext(drivestatstr,prop=fp_text(font.size=14,color=“black”))),location=ph_location_type(type=“body”))来终止ph_吗?
ph_with
需要一个rpptx对象(x)。在标题部分中,您使用
%>%
满足了这一需求,这就是您不需要在其中添加x的原因。如果您不以%>%结束您的行,并尝试将该行放在正文中,则会出现此错误。因此,要么将x添加到线主体线,要么使用管道结束上一行。