The officer package facilitates access to and manipulation of 'Microsoft Word' and 'Microsoft PowerPoint' documents from R. It also supports the writing of 'RTF' documents.
Examples of usage are:
Create Word documents with tables, titles, TOC and graphics
Importation of Word and PowerPoint files into data objects
Write updated content back to a PowerPoint presentation
Clinical reporting automation
Production of reports from a shiny application
To start with officer, read about read_docx(), read_pptx()
or rtf_doc().
The package is also providing several objects that can be printed
in 'R Markdown' documents for advanced Word or PowerPoint
reporting as run_autonum() and block_caption().
Get Word content in a data.frame
While officer allows you to generate Word and PowerPoint documents,
an important feature is also the ability to read the content of existing
Word documents. Use docx_summary() to extract document content as a
structured data.frame, making it easy to analyze and process Word files
programmatically.
Copy an officer object
'officer' objects of class rdocx or rpptx use R6 classes with reference
semantics. Assignment does NOT create a copy:
If you need independent documents (e.g., in loops), read the template each time:
See also
The user documentation: https://ardata-fr.github.io/officeverse/ and manuals https://davidgohel.github.io/officer/
Author
Maintainer: David Gohel [email protected]
Authors:
Stefan Moog [email protected]
Mark Heckmann [email protected] (ORCID)
Other contributors:
ArData [copyright holder]
Frank Hangler [email protected] (function body_replace_all_text) [contributor]
Liz Sander [email protected] (several documentation fixes) [contributor]
Anton Victorson [email protected] (fixes xml structures) [contributor]
Jon Calder [email protected] (update vignettes) [contributor]
John Harrold [email protected] (function annotate_base) [contributor]
John Muschelli [email protected] (google doc compatibility) [contributor]
Bill Denney [email protected] (ORCID) (function as.matrix.rpptx) [contributor]
Nikolai Beck [email protected] (set speaker notes for .pptx documents) [contributor]
Greg Leleu [email protected] (fields functionality in ppt) [contributor]
Majid Eismann [contributor]
Hongyuan Jia [email protected] (ORCID) [contributor]
Michael Stackhouse [email protected] [contributor]
