Learn R Programming

Introduction to reporter

Historically, R has not been very strong on reporting. The reporter package aims to fill that gap.

Using reporter, you can create a report in just a few lines of code. Not only is it easy to create a report, but the reporter package can handle all sorts of situations that other packages struggle with.

For example, unlike other packages, the reporter package creates the entire report: page header and footer, titles, footnotes, tables - everything. The end result of a reporter call is a complete, printable report.

In addition, reporter can handle page breaking, page wrapping, and automatic sizing of column widths. The package offers a choice of output file types. And it supports the inclusion of tables, text and graphics into a report.

What is more, the package does not expect you to know R Markdown, knitr, or pandoc. You do not need to learn Latex, HTML, or any other intermediate language. With reporter, you send your data into a create function, assign titles and footnotes, and write the report. That's it!

If you are familiar with SAS® software, you may notice some similarity between reporter functions and proc report. This similarity, however, is only on the surface. The implementation of reporter is done entirely in R, and, internally, is modeled in a different way. However, SAS® users will find the reporter functions very convenient and easy to understand compared to the alternatives.

Installation

The reporter package can be installed from the console. Simply run the following command:

install.packages("reporter")

Or if you want the latest development version, you can install it directly from github:

devtools::install_github("https://github.com/dbosak01/reporter")

Then put the following line at the top of your program or script:

library(reporter)

The reporter package will give you access to a number of functions to help create, lay out, and write your report to the file system. For examples and usage information, visit the reporter documentation site here.

Getting Help

If you need help, the first place to turn to is the reporter web site. The web site has full documentation on all reporter functions.

If you want to look at the code for the reporter package, visit the github page here.

If you encounter a bug or have a feature request, please submit an issue here.

See Also

The reporter package is part of the sassy meta-package. The sassy meta-package includes several packages that help make R easier for SAS® programmers. You can read more about the sassy package here.

Copy Link

Version

Install

install.packages('reporter')

Monthly Downloads

746

Version

1.4.4

License

CC0

Issues

Pull Requests

Stars

Forks

Maintainer

David Bosak

Last Published

March 19th, 2024

Functions in reporter (1.4.4)

lowcase_parens

Functions to format the population label
page_header

Add a page header
print.plot_spec

Prints the plot spec
get_theme

Get a theme
footnotes

Adds a footnote block
page_footer

Adds a page footer
ftn

Creates a footnote attribute
define

Defines a column
page_by

Adds a page by variable
options_fixed

Set options for a fixed-width report
print.text_spec

Prints the text spec
print.report_spec

Prints the report specification
print.style_spec

Prints a style specification
span

Defines a spanning header attribute
spanning_header

Defines a spanning header
set_margins

Set page margins
title_header

Adds a title header block
reporter

reporter: A package for creating statistical reports
print.table_spec

Prints the table spec
stub

Defines a report stub
titles

Adds a title block
write_registration_file

Create a registration file
write_report

Write a report to the file system
ttl

Creates a title attribute
add_content

Add content to a report
create_style

Creates a style object
create_report

Create a report
NotesOnPDF

Notes on PDF output type
cell_style

A style specification for a table cell
add_style

Add a style object to a report.
create_text

Create text content
create_table

Create a table
column_defaults

Set default attributes for one or more columns
create_plot

Create plot content