Skip to contents

Wraps htmlwidgets::saveWidget() to write a self-contained HTML report, creating the output directory when needed and appending .html to the file name when absent.

Usage

SaveWidgetReport(widget, strOutputDir = getwd(), strOutputFile)

Arguments

widget

htmlwidget The widget to save, e.g. from Widget_Histogram().

strOutputDir

character Directory where the report is written. Default: getwd().

strOutputFile

character Output file stem or filename.

Value

The normalized path to the saved report, invisibly.

Examples

dfResults <- ExampleData("adbds")
strReportPath <- SaveWidgetReport(
  Widget_Histogram(dfResults[dfResults$TEST == "Albumin", ]),
  strOutputDir = tempdir(),
  strOutputFile = "histogram"
)