Package: officer 0.6.8.003

officer: Manipulation of Microsoft Word and PowerPoint Documents

Access and manipulate 'Microsoft Word', 'RTF' and 'Microsoft PowerPoint' documents from R. The package focuses on tabular and graphical reporting from R; it also provides two functions that let users get document content into data objects. A set of functions lets add and remove images, tables and paragraphs of text in new or existing documents. The package does not require any installation of Microsoft products to be able to write Microsoft files.

Authors:David Gohel [aut, cre], Stefan Moog [aut], Mark Heckmann [aut], ArData [cph], Frank Hangler [ctb], Liz Sander [ctb], Anton Victorson [ctb], Jon Calder [ctb], John Harrold [ctb], John Muschelli [ctb], Bill Denney [ctb], Nikolai Beck [ctb], Greg Leleu [ctb], Majid Eismann [ctb], Hongyuan Jia [ctb]

officer_0.6.8.003.tar.gz
officer_0.6.8.003.zip(r-4.5)officer_0.6.8.003.zip(r-4.4)officer_0.6.8.003.zip(r-4.3)
officer_0.6.8.003.tgz(r-4.4-any)officer_0.6.8.003.tgz(r-4.3-any)
officer_0.6.8.003.tar.gz(r-4.5-noble)officer_0.6.8.003.tar.gz(r-4.4-noble)
officer_0.6.8.003.tgz(r-4.4-emscripten)officer_0.6.8.003.tgz(r-4.3-emscripten)
officer.pdf |officer.html
officer/json (API)
NEWS

# Install 'officer' in R:
install.packages('officer', repos = c('https://davidgohel.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/davidgohel/officer/issues

On CRAN:

ms-office-documentspowerpointword

15.81 score 608 stars 130 packages 3.6k scripts 84k downloads 3 mentions 162 exports 15 dependencies

Last updated 17 hours agofrom:c79f2c004d. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 20 2024
R-4.5-winOKNov 20 2024
R-4.5-linuxOKNov 20 2024
R-4.4-winOKNov 20 2024
R-4.4-macOKNov 20 2024
R-4.3-winOKNov 20 2024
R-4.3-macOKNov 20 2024

Exports:add_sheetadd_slideannotate_baseblock_captionblock_listblock_pour_docxblock_sectionblock_tableblock_tocbody_addbody_add_blocksbody_add_breakbody_add_captionbody_add_docxbody_add_fparbody_add_ggbody_add_imgbody_add_parbody_add_plotbody_add_tablebody_add_tocbody_add_xmlbody_bookmarkbody_commentbody_end_block_sectionbody_end_section_columnsbody_end_section_columns_landscapebody_end_section_continuousbody_end_section_landscapebody_end_section_portraitbody_removebody_replace_all_textbody_replace_gg_at_bkmbody_replace_img_at_bkmbody_replace_plot_at_bkmbody_replace_text_at_bkmbody_set_default_sectionchange_stylescolor_schemecursor_backwardcursor_begincursor_bookmarkcursor_endcursor_forwardcursor_reachcursor_reach_testdoc_propertiesdocx_body_relationshipdocx_body_xmldocx_bookmarksdocx_commentsdocx_current_block_xmldocx_dimdocx_reference_imgdocx_set_character_styledocx_set_paragraph_styledocx_show_chunkdocx_summaryempty_contentexternal_imgfooters_replace_all_textfooters_replace_img_at_bkmfooters_replace_text_at_bkmfortify_locationfp_borderfp_cellfp_parfp_tabfp_tabsfp_textfp_text_litefparftextget_reference_valueheaders_replace_all_textheaders_replace_img_at_bkmheaders_replace_text_at_bkmhyperlink_ftextimage_to_base64layout_dedupe_ph_labelslayout_propertieslayout_rename_ph_labelslayout_rename_ph_labels<-layout_summarymedia_extractmove_slidenotes_location_labelnotes_location_typeofficer_url_encodeon_slideopts_current_tablepack_folderpage_marpage_sizeph_hyperlinkph_locationph_location_fullsizeph_location_idph_location_labelph_location_leftph_location_rightph_location_templateph_location_typeph_removeph_slidelinkph_withplot_instrplot_layout_propertiespptx_summaryprop_sectionprop_tableread_docxread_pptxread_xlsxremove_slidertf_addrtf_docrun_autonumrun_bookmarkrun_columnbreakrun_commentrun_footnoterun_footnoterefrun_linebreakrun_pagebreakrun_referencerun_seqfieldrun_tabrun_word_fieldrun_wordtextsanitize_imagessection_columnsset_autonum_bookmarkset_doc_propertiesset_notesshape_properties_tagssheet_selectshortcutsslide_sizeslide_summaryslip_in_column_breakslip_in_footnoteslip_in_seqfieldslip_in_textslip_in_xmlsp_linesp_lineendstr_encode_to_rtfstyles_infotable_colwidthstable_conditional_formattingtable_layouttable_stylenamestable_widthto_htmlto_pmlto_rtfto_wmlunordered_listunpack_folderuuid_generatewml_link_images

Dependencies:askpassclicpp11gluelifecycleopensslR6raggrlangsyssystemfontstextshapinguuidxml2zip

Readme and manuals

Help Manual

Help pageTopics
Add a sheetadd_sheet
Add a slideadd_slide
Placeholder parameters annotationannotate_base
PowerPoint table to matrixas.matrix.rpptx
Caption blockblock_caption
List of blocksblock_list
External Word document placeholderblock_pour_docx
Section for 'Word'block_section
Table blockblock_table
Table of content for 'Word'block_toc
Add a list of blocks into a 'Word' documentbody_add_blocks
Add a page break in a 'Word' documentbody_add_break
Add Word caption in a 'Word' documentbody_add_caption
Add an external docx in a 'Word' documentbody_add_docx
Add fpar in a 'Word' documentbody_add_fpar
Add a 'ggplot' in a 'Word' documentbody_add_gg
Add an image in a 'Word' documentbody_add_img
Add paragraphs of text in a 'Word' documentbody_add_par
Add plot in a 'Word' documentbody_add_plot
Add table in a 'Word' documentbody_add_table
Add table of content in a 'Word' documentbody_add_toc
Add bookmark in a 'Word' documentbody_bookmark
Add comment in a 'Word' documentbody_comment
Add any sectionbody_end_block_section
Add multi columns sectionbody_end_section_columns
Add a landscape multi columns sectionbody_end_section_columns_landscape
Add continuous sectionbody_end_section_continuous
Add landscape sectionbody_end_section_landscape
Add portrait sectionbody_end_section_portrait
Remove an element in a 'Word' documentbody_remove
Replace text anywhere in the documentbody_replace_all_text footers_replace_all_text headers_replace_all_text
Add plots at bookmark location in a 'Word' documentbody_replace_gg_at_bkm body_replace_plot_at_bkm
Replace text at a bookmark locationbody_replace_img_at_bkm body_replace_text_at_bkm footers_replace_img_at_bkm footers_replace_text_at_bkm headers_replace_img_at_bkm headers_replace_text_at_bkm
Define Default Sectionbody_set_default_section
Replace styles in a 'Word' Documentchange_styles
Color scheme of a PowerPoint filecolor_scheme
Set cursor in a 'Word' documentcursor_backward cursor_begin cursor_bookmark cursor_end cursor_forward cursor_reach cursor_reach_test
Read document propertiesdoc_properties
List Word bookmarksdocx_bookmarks
Get comments in a Word document as a data.framedocx_comments
'Word' page layoutdocx_dim
Add character style in a Word documentdocx_set_character_style
Add or replace paragraph style in a Word documentdocx_set_paragraph_style
Show underlying text tag structuredocx_show_chunk
Get Word content in a data.framedocx_summary
Empty block for 'PowerPoint'empty_content
External imageexternal_img
Border properties objectfp_border update.fp_border
Cell formatting propertiesformat.fp_cell fp_cell print.fp_cell update.fp_cell
Paragraph formatting propertiesfp_par print.fp_par update.fp_par
Tabulation mark properties objectfp_tab
Tabs properties objectfp_tabs
Text formatting propertiesformat.fp_text fp_text fp_text_lite print.fp_text update.fp_text
Formatted paragraphfpar update.fpar
Formatted chunk of textftext
Formatted chunk of text with hyperlinkhyperlink_ftext
Detect and handle duplicate placeholder labelslayout_dedupe_ph_labels
Slide layout propertieslayout_properties
Change ph labels in a layoutlayout_rename_ph_labels layout_rename_ph_labels<-
Presentation layouts summarylayout_summary
Number of blocks inside an rdocx objectlength.rdocx
Number of slideslength.rpptx
Extract media from a document objectmedia_extract
Move a slidemove_slide
Location of a named placeholder for notesnotes_location_label
Location of a placeholder for notesnotes_location_type
Manipulate Microsoft Word and PowerPoint Documents with 'officer'officer-package officer
Defunct Functions in Package officerofficer-defunct slip_in_column_break slip_in_footnote slip_in_seqfield slip_in_text slip_in_xml
Change current slideon_slide
Page margins objectpage_mar
Page size objectpage_size
Hyperlink a placeholderph_hyperlink
Location for a placeholder from scratchph_location
Location of a full size elementph_location_fullsize
Location of a placeholder based on its idph_location_id
Location of a named placeholderph_location_label
Location of a left body elementph_location_left
Location of a right body elementph_location_right
Location for a placeholder based on a templateph_location_template
Location of a placeholder based on a typeph_location_type
Remove a shapeph_remove
Slide link to a placeholderph_slidelink
Add objects on the current slideph_with ph_with.block_list ph_with.character ph_with.data.frame ph_with.empty_content ph_with.external_img ph_with.factor ph_with.fpar ph_with.gg ph_with.logical ph_with.numeric ph_with.plot_instr ph_with.unordered_list ph_with.xml_document
Wrap plot instructions for png plotting in Powerpoint or Wordplot_instr
Slide layout properties plotplot_layout_properties
PowerPoint content in a data.framepptx_summary
Write a 'PowerPoint' file.print.rpptx
Write an 'RTF' document to a fileprint.rtf
Section propertiesprop_section
Table propertiesprop_table
Create a 'Word' document objectprint.rdocx read_docx
Create a 'PowerPoint' document objectread_pptx
Create an 'Excel' document objectlength.rxlsx print.rxlsx read_xlsx
Remove a slideremove_slide
Add content into an RTF documentrtf_add rtf_add.block_list rtf_add.block_section rtf_add.character rtf_add.double rtf_add.factor rtf_add.fpar rtf_add.gg rtf_add.plot_instr
Create an RTF document objectrtf_doc
Auto numberrun_autonum
Bookmark for 'Word'run_bookmark
Column break for 'Word'run_columnbreak
Comment for 'Word'run_comment
Footnote for 'Word'run_footnote
Word footnote referencerun_footnoteref
Page break for 'Word'run_linebreak
Page break for 'Word'run_pagebreak
Cross referencerun_reference
Tab for 'Word'run_tab
'Word' computed fieldrun_seqfield run_word_field
Word chunk of text with a stylerun_wordtext
Section columnssection_columns
Update bookmark of an autonumber runset_autonum_bookmark
Set document propertiesset_doc_properties
Set notes for current slideset_notes set_notes.block_list set_notes.character
Select sheetsheet_select
shortcuts for formatting propertiesshortcuts
Slides width and heightslide_size
Slide content in a data.frameslide_summary
Line propertiesprint.sp_line sp_line update.sp_line
Line end propertiesprint.sp_lineend sp_lineend update.sp_lineend
Read 'Word' stylesstyles_info
Column widths of a tabletable_colwidths
Table conditional formattingtable_conditional_formatting
Algorithm for table layouttable_layout
Paragraph styles for columnstable_stylenames
Preferred width for a tabletable_width
Unordered listunordered_list