Learn R Programming

doBy (version 4.4.0)

Rscript2HTML: Automatic Generation of Reports (as HTML documents)

Description

HTMLreport provides a simple framework for mixing text and R code for automatic report generation. The basic idea is to replace the R code with its output, such that the final document only contains the text and the output of the statistical analysis.

Usage

Rscript2HTML(srcfile, driver = RweaveHTMLreport(), destdir=".",
postfix="REPORT", cssfile=NULL, cleanup=TRUE, ...)

Arguments

srcfile
A text file with R code and descriptive text. The file name extension can be anything except .html as this is the name of the output file
driver
The actual workhorse
destdir
Specification of where to put the report.
postfix
A string to append to the filename for the HTML file.
cssfile
An optional cssfile; must be located in destdir to take effect.
cleanup
If set to FALSE then the temporary files are not removed.
...
Further arguments, currently not used.

Value

  • None

See Also

Sweave

Examples

Run this code
tf <- system.file("HTMLreport", "PuromycinAnalysis-report.R",
   package = "doBy")

## Create report in working directory
Rscript2HTML(tf)
## Creates report in specified directory (which must exist).
##Rscript2HTML(tf, path=".REPORT/")

Run the code above in your browser using DataLab