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
htmlwidgetThe widget to save, e.g. fromWidget_Histogram().- strOutputDir
characterDirectory where the report is written. Default:getwd().- strOutputFile
characterOutput file stem or filename.
Examples
dfResults <- ExampleData("adbds")
strReportPath <- SaveWidgetReport(
Widget_Histogram(dfResults[dfResults$TEST == "Albumin", ]),
strOutputDir = tempdir(),
strOutputFile = "histogram"
)