Skip to contents

This R6 class relates to the activity table in the generic report that documents the person who perfomed the activity and the person who validated and the respective dates. 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

activity

Active binding for setting the activity

main_author_name

Active binding for setting the main author name

main_activity_date

Active binding for setting the main acitivty date

qc_author_name

Active binding for setting the QC author name

qc_activity_date

Active binding for setting the QC activity date

Methods


Method new()

Usage

ActivityTable$new(
  activity = NA_character_,
  main_author_name = NA_character_,
  main_activity_date = NA_character_,
  qc_author_name = NA_character_,
  qc_activity_date = NA_character_
)

Arguments

activity

Name of the activity that was performed

main_author_name

Name (Firstname Lastname) of the person who performed the activity

main_activity_date

Date (DD-Mmm-YYYY) when activity was performed.

qc_author_name

Name (Firstname Lastname) of reviewer.

qc_activity_date

Date (DD-Mmm-YYYY) when QC was performed.

Examples

at <- ActivityTable$new(
 activity = 'Super cool calculation',
 main_author_name = 'David Bowie',
 main_activity_date = '01-Oct-2024',
 qc_author_name = 'Freddie Mercury',
 qc_activity_date = '20-Oct-2024')


Method get_table()

Show activity table. Takes an object of class ActivityTable. as input and generates Table 1 of the Generic Report Document.

Usage

ActivityTable$get_table()

Arguments

act

An object of class ActivityTable.

Returns

Table 1 of the Sample Size Document.

Examples

at <- ActivityTable$new(
 activity = 'Super cool calculation',
 main_author_name = 'David Bowie',
 main_activity_date = '01-Oct-2024',
 qc_author_name = 'Freddie Mercury',
 qc_activity_date = '20-Oct-2024')

at$get_table()


Method clone()

The objects of this class are cloneable with this method.

Usage

ActivityTable$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `ActivityTable$new`
## ------------------------------------------------

at <- ActivityTable$new(
 activity = 'Super cool calculation',
 main_author_name = 'David Bowie',
 main_activity_date = '01-Oct-2024',
 qc_author_name = 'Freddie Mercury',
 qc_activity_date = '20-Oct-2024')
#> Loading required namespace: testthat


## ------------------------------------------------
## Method `ActivityTable$get_table`
## ------------------------------------------------

at <- ActivityTable$new(
 activity = 'Super cool calculation',
 main_author_name = 'David Bowie',
 main_activity_date = '01-Oct-2024',
 qc_author_name = 'Freddie Mercury',
 qc_activity_date = '20-Oct-2024')

at$get_table()
Table 1-1. People involved in the activity performed

Activity

Name

Date

Super cool calculation performed by

David Bowie

01-Oct-2024

Super cool calculation reviewed by

Freddie Mercury

20-Oct-2024