Renders a travel diary to a PDF file using R Markdown. The travel diary must be created with create_simple_travel_diary().

render_travel_diary(
  travel_diary,
  name,
  department = "Department of Econometrics and Business Statistics",
  output_path = getwd(),
  output_file,
  ...
)

Arguments

travel_diary

A data frame representing the travel diary, created with create_simple_travel_diary().

name

The name of the person for whom the travel diary is created.

department

The department name (default is "Department of Econometrics and Business Statistics").

output_path

The directory where the PDF will be saved (default is the current working directory).

output_file

The name of the output PDF file (without extension).

...

Additional arguments passed to rmarkdown::render().

Examples

if (interactive()) {
diary <- create_simple_travel_diary(
   start_date = as.Date("2025-08-18"), 
   end_date = as.Date("2025-09-01"), 
   destination = "Perth", 
   reason = "NUMBATS Conference") |> 
render_travel_diary(output_file = "test.pdf", name = "Michael")
}