info_table: Create a pretty table of information

Description Usage Arguments Value Examples

View source: R/user-utils.R

Description

These functions help you create a readable table of information, intended to be used to populate a coversheet in an Excel report.

Usage

1
2
3
4
5
6
7
8
9
info_table(..., .pretty_names = TRUE)

default_info_table(
  data_included = "",
  data_exported_by = get_user(),
  exported_on = strftime(Sys.time(), "%Y-%m-%d"),
  .pretty_names = TRUE,
  ...
)

Arguments

...

Named vectors. The names give the single value that will appear in the left-hand column, while the values will appear on separate rows in the right-hand column.

.pretty_names

If TRUE then some standardisation is performed on the values in the left-hand column. This includes the capitalisation of the first letter and the replacement of underscores with spaces.

data_included

The names of the data sheets included in the report

data_exported_by

The name of the reporter

exported_on

The date of the report

Value

A data.frame

Examples

1
2
3
4
5
6
7
8
9
info_table(
  first_category = letters[1:3],
  second_category = "d"
)

default_info_table(
  data_included = c("Blackberry", "Apple", "Orange"),
  author = "Jacob"
)

wurli/quickReport documentation built on Dec. 23, 2021, 6:13 p.m.