1 year ago

#272657

test-img

Jan Bos

Warning message in the officer package after adding exactly 100 slides

I get warning messages in the officer package after adding more than exactly 100 slides.

library(officer)
pres = read_pptx(path = NULL)
for (i in 1:100)
{
    print(i)
    pres <- add_slide( x = pres , layout = "Title Only", master = "Office Theme" )
}

The warning message is:

Warning message:
In x$slide$add_slide(xml_file, x$slideLayouts$get_xfrm_data()) :
  NAs introduced by coercion

No warning message would be generated if I limit the number of slides to 99 i.e. with

library(officer)
pres = read_pptx(path = NULL)
for (i in 1:99)
{
    print(i)
    pres <- add_slide( x = pres , layout = "Title Only", master = "Office Theme" )
}

the warning is not shown.

Is there some limit on the number of slides one can add in the officer package? And, if so, is there a way to fix this is since I need to generate over 100 slides to store data together.

Could not find this in the documentation. The above was tested with officer_0.4.1 on Windows 11 R4.1.1.

r

officer

0 Answers

Your Answer

Accepted video resources