Learn R Programming

qcmetrics (version 1.10.2)

qcReport-methods: Automatic report generation

Description

The qcReport method generates report in various formats taking a QcMetrics instance as input. Each individual quality control item produces a section with description of the item and a assessment figure.

Arguments

Details

The reporting functions take a QcMetrics instance as input, generate the source of the report and compile it into the final format that are currently available are reporting_pdf, reporting_tex, reporting_rmd, reporting_html and reporting_nozzle. See qcto for details about the sectioning functions, that convert individual QcMetric objects into adequate report sections.

The package vignette documents the report generation in more details and describes possibilities for customisation.

Examples

Run this code
example(QcMetrics)
show(qcm)

destdir <- tempdir()
(report <- file.path(destdir, "testQCReport"))

## pdf report
qcReport(qcm, reportname = report)

## use pdflatex to generate the pdf file
    qcReport(qcm, reportname = report, texi2dvi = "pdflatex")

## default html report
html <- qcReport(qcm, reportname = report, type = "html")
html
if (interactive())
    browseURL(html)

## using a custom css templates
writeLines("body {
    font-size: 14pt;
    width: 650px;
    background: #789855;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    margin-bottom: 20;
    text-align:justify;
}", con = "style.css")

html2 <- qcReport(qcm, reportname = "customreport", template = "style.css", type = "html")
if (interactive())
    browseURL(html2)

Run the code above in your browser using DataLab