Skip to contents

This R6 class relates to the Title Page in a report that adds all the required fields of the Generic Report Title Page Developer note: This class is developed using private and active fields rather than public fields directly which facilitates more rigid behaviour after the class has been initialised. If it is deemed that edit the fields after initialisation is a rare case then we might consider simplifying these classes to use public fields.

Active bindings

report_title

Active binding for setting the report title

department

Active binding for setting the department

study_title

Active binding for setting the study title

study_number

Active binding for setting the study number

status

Active binding for setting the document status

version

Active binding for setting the document version

date

Active binding for setting the date

bus_class

Active binding for setting the business classification

changelog_table

Active binding for setting the changelog table

signatures_table

Active binding for setting the signatures table

Methods


Method new()

Usage

TitlePage$new(
  report_title = NA_character_,
  department = NA_character_,
  study_title = NA_character_,
  study_number = NA_character_,
  status = c("Draft", "Final"),
  version = NA_character_,
  date = NA_character_,
  bus_class = NA_character_,
  changelog_table = NULL,
  signatures_table = NULL
)

Arguments

report_title

String. Report title.

department

String. Department.

study_title

String. Study title of the document

study_number

String. Study number of the document

status

String. Status of the document, with possible values Draft or Final

version

String. Version of the document.

date

String. Date (DD-Mmm-YYYY) of the final document release.

bus_class

String. Business Classification.

changelog_table

Flextable. Table to be added after the title page (Optional)

signatures_table

Flextable. Table to be added after the title page (Optional)

Examples

\dontrun{
tp = TitlePage$new(
  report_title = "Super cool document",
  department = "Cool department",
  study_title = "Compute super cool things",
  study_number = "OWNDJQW9923",
  status = "Draft",
  version  = "1",
  date = "01-Feb-2024",
  bus_class = "Very confidential")
  }


Method get_title_page()

Generate title page. Takes an object of class TitlePage. as input and generates the title page.

Usage

TitlePage$get_title_page(
  reference_docx = generic_report_template(),
  output_path = "."
)

Arguments

reference_docx

String. Template document in .docx format providing styling and structure information for rendering your docx report. This is configured to be Generic Report Template using the function generic_report_template().

output_path

String. Path where the title page in docx format should be written. Default is the current working directory.

Returns

A title page in Word format ('_generic_report_title.docx').

Examples

\dontrun{
tp = TitlePage$new(
  report_title= "Super cool document",
  department = "Cool department",
  study_title = "Compute super cool things",
  study_number = "OWNDJQW9923",
  status = "Draft",
  version  = "1",
  date = "01-Feb-2024",
  bus_class = "Very confidential")
tp$get_title_page()
}


Method clone()

The objects of this class are cloneable with this method.

Usage

TitlePage$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `TitlePage$new`
## ------------------------------------------------

if (FALSE) { # \dontrun{
tp = TitlePage$new(
  report_title = "Super cool document",
  department = "Cool department",
  study_title = "Compute super cool things",
  study_number = "OWNDJQW9923",
  status = "Draft",
  version  = "1",
  date = "01-Feb-2024",
  bus_class = "Very confidential")
  } # }

## ------------------------------------------------
## Method `TitlePage$get_title_page`
## ------------------------------------------------

if (FALSE) { # \dontrun{
tp = TitlePage$new(
  report_title= "Super cool document",
  department = "Cool department",
  study_title = "Compute super cool things",
  study_number = "OWNDJQW9923",
  status = "Draft",
  version  = "1",
  date = "01-Feb-2024",
  bus_class = "Very confidential")
tp$get_title_page()
} # }