Class that defines the Signatures Table in the Generic Report
SignaturesTable.Rd
This R6 class controls one row of the Signatures table that documents the date, version, reason and what changed in the update on the document. It uses the ChangelogTableRow class to manage the different rows in the table, and control the checks
Methods
Method add_row()
Takes an object of class SignaturesTableRow. as input and adds it to the list of rows.
Examples
str <- SignaturesTableRow$new(
name = 'Harry Styles',
department = 'eCompliance',
date = '15-Feb-2024')
signatures_table <- SignaturesTable$new()
signatures_table$add_row(str)
Method to_dataframe()
Create a dataframe from all the rows in the row
Examples
str <- SignaturesTableRow$new(
name = 'Harry Styles',
department = 'eCompliance',
date = '15-Feb-2024')
signatures_table <- SignaturesTable$new()
signatures_table$add_row(str)
signatures_table$to_dataframe()
Method get_table()
Generates the signature table usin to_dataframe()
Examples
str_1 <- SignaturesTableRow$new(
name = 'Harry Styles',
department = 'eCompliance',
date = '15-Feb-2024')
str_2 <- SignaturesTableRow$new(
name = 'Alex Turner',
department = 'Product Development',
date = '20-Feb-2024')
signatures_table <- SignaturesTable$new()
signatures_table$add_row(str_1)
signatures_table$add_row(str_2)
signatures_table$get_table()
Examples
## ------------------------------------------------
## Method `SignaturesTable$add_row`
## ------------------------------------------------
str <- SignaturesTableRow$new(
name = 'Harry Styles',
department = 'eCompliance',
date = '15-Feb-2024')
signatures_table <- SignaturesTable$new()
signatures_table$add_row(str)
## ------------------------------------------------
## Method `SignaturesTable$to_dataframe`
## ------------------------------------------------
str <- SignaturesTableRow$new(
name = 'Harry Styles',
department = 'eCompliance',
date = '15-Feb-2024')
signatures_table <- SignaturesTable$new()
signatures_table$add_row(str)
signatures_table$to_dataframe()
#> Name Department Date Signatures
#> 1 Harry Styles eCompliance 15-Feb-2024
## ------------------------------------------------
## Method `SignaturesTable$get_table`
## ------------------------------------------------
str_1 <- SignaturesTableRow$new(
name = 'Harry Styles',
department = 'eCompliance',
date = '15-Feb-2024')
str_2 <- SignaturesTableRow$new(
name = 'Alex Turner',
department = 'Product Development',
date = '20-Feb-2024')
signatures_table <- SignaturesTable$new()
signatures_table$add_row(str_1)
signatures_table$add_row(str_2)
signatures_table$get_table()
Name
Department
Date
Signatures
Harry Styles
eCompliance
15-Feb-2024
Alex Turner
Product Development
20-Feb-2024