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

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

info_table( first_category = letters[1:3], second_category = "d" )
#> # A tibble: 4 × 2 #> category values #> <chr> <chr> #> 1 First category a #> 2 NA b #> 3 NA c #> 4 Second category d
default_info_table( data_included = c("Blackberry", "Apple", "Orange"), author = "Jacob" )
#> # A tibble: 6 × 2 #> category values #> <chr> <chr> #> 1 Data included Blackberry #> 2 NA Apple #> 3 NA Orange #> 4 Data exported by runner #> 5 Exported on 2021-08-26 #> 6 Author Jacob