createReport(fname, title, page.title = "RnBeads report", authors = NULL, dirs = NULL, init.configuration = FALSE)
character
vector denoting the name of the file to contain the HTML
report. If this file already exists, it will be overwritten.character
vector.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 (.
).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
.Report
object.
dirs
must be a character
vector. The following names are read:
"configuration"
Directory that contains the auxilliary configuration files, such as style sheets and
Javascript files. If missing or NA
, the default value used is "configuration"
.
"data"
Directory to contain the tables, lists and other generated data files that are linked to in
the HTML report. If missing or NA
, the value used is formed from the file name fname
(without
the extension) and the suffix "_data"
.
"pngs"
Directory to contain the low resolution PNG images shown in the HTML report. If missing or
NA
, the value used is formed from the file name fname
(without the extension) and the suffix
"_images"
.
"pdfs"
Directory to contain the PDF images (if such are created). If not missing or NA
, the
value used is formed from the file name fname
(without the extension) and the suffix "_pdf"
.
"high"
Directory to contain the high resolution PNG images (if such are created). If missing or
NA
, the value used is the same as the pngs
directory.
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.
Report
for functions adding contents to an HTML report
report <- createReport("example.html", "Example", init.configuration = TRUE)
Run the code above in your browser using DataLab