create_front_matter: Create front matter

Description Usage Arguments Details Value Examples

View source: R/create_front_matter.R

Description

Creates the first page of the report.

Usage

1
2
3
4
5
6
7
8
9
create_front_matter(
  title = "Report",
  subtitle = NULL,
  author = NULL,
  date = NULL,
  logo = NULL,
  image = NULL,
  write = FALSE
)

Arguments

title

Character. The report title. Defaults to "Report".

subtitle

Character. The report subtitle. Defaults to NULL.

author

Character. The report author. Defaults to NULL.

date

Character. The report date. Defaults to NULL.

logo

Character. The path to a valid image file to use as logo. Defaults to NULL.

image

Character. The path to some other front matter image. Defaults to NULL.

write

Logical. If TRUE the front matter is written to disk and rendered. Defaults to FALSE.

Details

For all arguments, NULL means that the item will not be included.

Value

A character vector with the front matter as markdown.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Create front matter with only the title "Report" 
create_front_matter()

## Use a custom title
create_front_matter("My report")

## Create a full front page and write to disk
title <- "My report"
subtitle <- "Made with reporter"
author <- "Just me"
date <- lubridate::today()
logo <- "my-logo.png"
image <- "my-image.png"
create_front_matter(title, subtitle, author, date, logo, image, write = TRUE)

martingerdin/reporter documentation built on Aug. 28, 2020, 12:05 a.m.