createReport: createReport

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Report-methods.R


Creates a new report object.


createReport(fname, title, page.title = "RnBeads report", authors = NULL,
  dirs = NULL, init.configuration = FALSE)



Single-element character vector denoting the name of the file to contain the HTML report. If this file already exists, it will be overwritten.


Title of the report in the form of a single-element character vector.


Web page title. This usually appears in the web browser's window title when the report is open. If specified, this must be a vector. Note that only the first element is used.


Optional list of authors in the form of a character vector. This list is included in the header of the generated HTML file. Note that author names can contain only Latin leters, space, dash (-), comma (,) or dot (.).


Location of the supporting directories, that is, paths that are expected to contain additional files linked to from the HTML report. See the Details section for a list of these directories.


Flag indicating if the report configuration data should be initialized. If this parameter is TRUE, the method creates the respective directory and copies configuration files that define cascading style sheet (CSS) definitions and Javascript functions used by the HTML report. If such configuration files already exist, they will be overwritten. Since the aforementioned files can be shared by multiple reports, it is recommended that the configuration is initialized using the method rnb.initialize.reports, instead of setting this flag to TRUE.


If specified, the parameter dirs must be a character vector. The following names are read:

Any other elements, if present, are ignored. Note that these directories are not required to point to different locations. In particular, if the directories for low and for high resolution images are identical, the high-resolution image files are assumed to be the ones with suffix "_high_resolution.png". See createReportPlot for creating image files. In order to ensure independence of the operating system, there are strong restrictions on the names of the file and directories. The name of the report's HTML file can consist of the following symbols only: Latin letters, digits, dot (.), dash (-) and underline (_). The extension of the report's HTML file must be one of htm, html, xhtml or xml. The supporting directories must be given as relative paths; the restrictions on the path names are identical to the ones for file name. Forward slash (/) is to be used as path separator. Path names cannot start or end with a slash. None of the directory names can be an empty string, use "." instead. A value in the form "mypath/.html" for fname is invalid. Upon initialization, the report attempts to create or overwrite the specified fname. If the path to it does not exist, or if the current process does not have permissions to write to the file, report initialization will fail. The report object visits each supporting directory (except configuration) and attempts to create it, unless it is an existing empty directory. Report initialization will fail if any of the visited directories does not meet the criteria and could not be created. Hidden files (file names starting with "." on Unix platforms) are ignored. Thus, all supporting directories that already exist and contain hidden files only are considered valid.


Newly created Report object.


Yassen Assenov

See Also

Report for functions adding contents to an HTML report


report <- createReport("example.html", "Example", init.configuration = TRUE)

RnBeads documentation built on Jan. 20, 2018, 11:06 a.m.