Saves report in onbrand object to the specified file.

save_report(obnd, output_file = NULL, verbose = TRUE)

Arguments

obnd

onbrand report object

output_file

File name to save the report.

verbose

Boolean variable when set to TRUE (default) messages will be displayed on the terminal; Messages will be included in the returned onbrand object.

Value

List with the following elements

  • isgood: Boolean variable indicating success or failure

  • msgs: Vector of messages

Examples


obnd = read_template(
      template = file.path(system.file(package="onbrand"), "templates", "report.pptx"),
      mapping  = file.path(system.file(package="onbrand"), "templates", "report.yaml"))

save_report(obnd, tempfile(fileext = ".pptx"))
#> $isgood
#> [1] TRUE
#> 
#> $msgs
#> NULL
#> 

obnd = read_template(
      template = file.path(system.file(package="onbrand"), "templates", "report.docx"),
      mapping  = file.path(system.file(package="onbrand"), "templates", "report.yaml"))

save_report(obnd, tempfile(fileext = ".docx"))
#> $isgood
#> [1] TRUE
#> 
#> $msgs
#> NULL
#>