Learn R Programming

presenter

Installation

You can Install the released version of presenter from CRAN with:

install.packages("presenter")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("Harrison4192/presenter")

Package Description

This package consists of custom wrapper functions using packages openxlsx, flextable, and officer to create highly formatted MS office friendly output of your data frames. This should be useful to anyone who relies on sharing information in excel or powerpoint in business and consulting scenarios. The functions are opinionated in the sense that they expect the input data frame to have certain properties in order to take advantage of the automated formatting. Certain novel features of this package include:

  • Supports Lists: make_simple_excel and make_powerpoint can accept single tables or lists of tables, which will be given separate sheets

  • Automatic Naming: You can pipe your data frame, list, or flextable directly into the function. An excel or powerpoint will be generated with no further arguments necessary, named after your table. In order to avoid name clashing, a random string is appended to the name so files will not be overwritten. In the case of a multi-pipe operation piped into your function, a generic name will be randomly generated.

  • Automatic Opening: Files are automatically opened upon generation so you can inspect your output.

  • header words: By supplying a character vector to the “header_word” argument, you can automatically merge or color adjacent column headers based off a common key word. This functionality relies on word separation with “.” or “_” and will not work properly in other cases like snakeCase. Can be left blank for no special formatting.

  • last id col: This package is optimized for tables that begin with their “id” or “group” columns and then followed by “value” columns. By supplying an integer position of the last id column, you can apply special formatting for the id cols. Can be left blank for no special formatting.

Copy Link

Version

Install

install.packages('presenter')

Monthly Downloads

258

Version

0.1.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

February 2nd, 2023

Functions in presenter (0.1.2)

make_powerpoint

Send Table to Powerpoint
make_excel

Create Excel
make_pivot_table

Make pivot table
make_flextable

Make Flextable
make_excel_wb

create excel wb
make_simple_excel

Make a simple excel
style_header_sequence

style_header_sequence
format_number

format number
flex_mergev1

flex_mergev1
get_piped_name

get piped name
is_percentage

is_percentage
finish_excel_wb

finish excel workbook
pivot_summary

Pivot Summary
charvec_to_formula

charvec_to_formula
flex_mergev1_formula

flex_mergev1_formula
flex_set_headers

charvec_to_formula
flex_create_headers

flex_create_headers
format_red

format_red
%>%

Pipe operator