I am trying to generate a report using a template .pptx file provided to me (originally within a zipped folder, which I extracted and saved locally). R is giving me the following error when I run this code:
doc <- read_pptx('template_files/empty_template/RL_Template.pptx')
Error in tmp_names[match(old_, tmp_names)] <- new_ : NAs are not allowed in subscripted assignments
The file RL_Template.pptx is a powerpoint template that will be populated with text and images. All scripts, data files, and templates are contained inside an R project, again, saved locally.
I have tried to execute the same line of code on a different machine of mine and get the same error, although a collaborator can successfully download/unzip the same files, run the same code, and generate the appropriate powerpoint output. He and I are running the same versions of R and RStudio. I can successfully run this line of code to create a new object in R:
foo<-read_pptx()
and can add content to foo using add_slide()
I have updated all associated packages. I have full admin privileges on my machine so it should not be an error with read/write permissions. It seems like maybe a problem with zip? Any ideas would be appreciated.
Session info:
R version 3.6.2 (2019-12-12) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] dplyr_0.8.4 readxl_1.3.1 flextable_0.5.7 officer_0.3.6 SWMPrExtension_1.1.2 SWMPr_2.3.1
[7] zoo_1.8-7 ggplot2_3.2.1