Reportwriter: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Scott
imported>Scott
 
Line 81: Line 81:
* '''outdir''' : [{''}] Default folder to save reports to. If emptyreports are saved to EVRIDIR folder in "analysisreports".
* '''outdir''' : [{''}] Default folder to save reports to. If emptyreports are saved to EVRIDIR folder in "analysisreports".


* '''ignoretags''' : [{'gawindow'}] %Ignore figures with these tags. Default includes 'gawindow' because causes problems when variable selection is used (hidden GA window). To remove crossval gui add 'crossvalgui' to list.
* '''ignoretags''' : [{'gawindow'}] Ignore figures with these tags. Default includes 'gawindow' because causes problems when variable selection is used (hidden GA window). To remove crossval gui add 'crossvalgui' to list.


===Example===
===Example===

Latest revision as of 14:53, 14 November 2018

This page describes the Report Writer feature and its usage

Introduction

ReportWriter allows the user a convenient way to create a summary report of their current work. It is available as a menu item in the Analysis window in Solo and PLS_Toolbox and as a command line function in PLS_Toolbox. The summary report includes details of the data and analysis used and of the model if one was created. Figures opened from the Analysis window are also shown in the report. The report is generated in HTML format as a webpage by default. Microsoft Word or Powerpoint document output formats are also available on Windows platforms.

Usage

The Reportwriter is available from the analysis GUI “Tools” menu item.

Wikifig1.gif

You can choose to create the report in HTML format on Mac OSX, or in HTML, Powerpoint or Word format on Windows platforms. When you select the report format you are presented with a text entry window allowing you to add comments which will be included in the report. Clicking the “OK” button on this window initiates the creation of the report, whether you added comments or not. Clicking “Cancel” will abort the creation of the report. When a report is generated it opens automatically (Word or Powerpoint documents will be minimized to the taskbar). In the case of HTML format the report document and associated image files are saved in a folder with a name of the form “AnalysisReport_20100828T173449” (plus a suffix). You can use the application’s save function to save a copy of the report to a permanent location using a new name, if desired. The Report Writer drop-down choice “Open Report Folder” allows you to open the folder where report files are saved on your computer.

In the case of HTML you can save the report as follows:

Firefox: Menu: “File”->”Save Page As…”

Internet Explorer: “File”->”Save As”, using “Web page complete” option.

Contents of the Report

There are two main sections to the report, namely, the "Analysis Details" section and the "Associated Figures" section, as shown in the example below taken from a PCR model in Analysis using the plsdata dataset. The "Analysis Details" section can contain subsections named "Model" if a model has been built, "SSQ Table" if the model is of a type which includes such sums of squares information, and "Prediction" if the model has been applied to test data. There is also a "Comments" subsection which contains any comments the user can optionally insert as they create the report.

The "Figures Associated with the Analysis" section shows all figures which were opened from the analysis GUI. When the report is in HTML format these figures are .PNG format but they are also available in .FIG and .EPS formats by following links which appear below the figure labeled "View as EPS" and "View as .FIG".

Example of HTML format analysis report:

Wikifig2.gif

Finding Saved Figures

Reports are saved to the EVRI temp directory in a folder named "analysisreports". This folder contains a report type folder named "html" (and "word" and "powerpoint" for Windows operating systems). The report type folder contains all reports created using that format. Considering the HTML format for example, there will be a file and a folder created in the html folder for each new report. They will have a name formed using a date and timestamp, for example, "AnalysisReport_20100828T173449.html". The folder will have the same name as the file (minus the suffix) and will contain the image files for the figures shown in the report. There will be three versions of each image file, .PNG, .EPS and .FIG..

Reportwriter also removes old report files from the analysisreports sub-folders itself. When reportwriter runs it deletes files from its temporary directory which are older than options.maxage (days), which has a default value of 10 days. This option is configurable through the preferences expert interface (function name "reportwriter").

Command Line Usage

The "reportwriter" function can be used to create a report from the command line on specific figures and optionally include information on a model. User comments may also be included in the report. The report is saved in the same manner as described above for analysis GUI generated reports. The report can be created in any format (HTML, Word, Powerpoint - although HTML is the only supported format on MAC and Linux).

Synopsis

filename = reportwriter(target, figs, comments, options); %Report including the figures listed
filename = reportwriter(target, model, comments, options); %Report on model supplied
filename = reportwriter(target, modelcell, comments, options); %Report on model and figures supplied
filename = reportwriter(target, h, comments, options); %Report on Analysis with handle h

Description

Report writer generates an analysis report in the requested target format. Typically, a report is generated based on a model and figures created within the Analysis window. However, instead of providing an Analysis window handle, the caller may instead provide a vector of figure handles, a model alone, or a cell array containing a model and figure handles.

Inputs

  • target = The program/file format to export figures to. Can have the following values:
'html'  : HTML document
'powerpoint' : Microsoft PowerPoint
'word'  : Microsoft Word
  • Second input can be any of the following:
    • h = Handle to existing Analysis Window
    • figs = One or more handles of figures to include in a report (without any model information)
    • model = Model to report on (without figures)
    • modelcell = Cell array containing a model and handles of any figures to include in the report. E.g.: {model fig1 fig2 fig3}

Optional Inputs

  • comments = A comment string (user supplied comments). If empty, no comment is included.
  • options = a structure with one or more of the fields identified below.

Outputs

  • filename = name of the report file, including path.

Options

  • notificationdialog : [{'off'}| 'on' ] Show a dialog at completion of report generation?
  • autocreateplots : [ {'off'} | 'on'] Automatically create standard plots (if reporting on an Analysis figure)
  • autoopening : [ 'off' |{'on'}] Open the report when it is generated?
  • autonaming : [ 'off' |{'on'}] Determine how output files should be named. If 'on', output files are given unique names. Otherwise, files are always given the same name so each new report overwrites the previous.
  • maxage : [10] Maximum age (in days) for old reports. Reports left in report folder longer than this will be automatically deleted.
  • outdir : [{}] Default folder to save reports to. If emptyreports are saved to EVRIDIR folder in "analysisreports".
  • ignoretags : [{'gawindow'}] Ignore figures with these tags. Default includes 'gawindow' because causes problems when variable selection is used (hidden GA window). To remove crossval gui add 'crossvalgui' to list.

Example

This is a convenient way of creating .PNG, .EPS or .FIG versions of your figures. For example, if you had 3 figures (figures 1, 4 and 5) you wanted to versions of them in the appropriate file formats, use the command:

  filename = reportwriter('html',[1 4 5])

to create an HTML report and the figures. Likewise, if you had a model to include, pass it in a CELL with the figures:

  filename = reportwriter('html',{model 1 4 5})

The returned report file name includes the path to the folder which contains the figure files. For example, if the returned file name is:

'C:\Users\username\AppData\Local\EVRI\analysisreports\html\AnalysisReport_20100901T230749.html'

then the figure files are located in the folder named

'C:\Users\username\AppData\Local\EVRI\analysisreports\html\AnalysisReport_20100901T230749'.


Comments may also be added to the generated report by including a text string as the third argument:

  filename = reportwriter('html',[1 4 5], 'User comments for the report')