Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/Report-methods.R
Creates a new report object.
1 2 3 4 5 6 7 8 | createReport(
fname,
title,
page.title = "RnBeads report",
authors = NULL,
dirs = NULL,
init.configuration = FALSE
)
|
fname |
Single-element |
title |
Title of the report in the form of a single-element |
page.title |
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. |
authors |
Optional list of authors in the form of a |
dirs |
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. |
init.configuration |
Flag indicating if the report configuration data should be initialized. If this parameter
is |
If specified, the parameter 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.
Newly created Report
object.
Yassen Assenov
Report
for functions adding contents to an HTML report
1 | report <- createReport("example.html", "Example", init.configuration = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.