I am trying to develop a function that will download an .rmd and .pptx files to create a consistent visual identity. I have uploaded a .pptx file to use as a reference doc however when I download it using download.file() I get an error saying there is a problem with the content and it can't be read. The Github is here:
EDIT: I tried the same with a Word doc and same error.
By default, downlaod.files() assumes it's downloading text and saves it as such. For a Powerpoint file, you want it saved as-is, so you need to indicate it's a binary format: