Learn R Programming

htmlreportR

htmlreportR has not been built from scratch. It is based on its Python equivalent and sister project, available at https://pypi.org/project/py-report-html/ for a Python equivalent.

Installation

Standard installation:

install.packages("htmlreportR")

You can install the development version of htmlreportR from GitHub with:

# install.packages("devtools")
devtools::install_github("AEstebanMar/htmlreportR")

Example

There are two use cases for htmlreportR: script mode and package mode.

Script mode

Simply call the html_report.R script, distributed with this package. Simply provide a comma-separated list of files and a template to render, and you’re done!

./scripts/html_report.R -d data1.txt,data2.txt -t template.txt

Library mode

If you wish to use htmlreportR directly from R, you can! Here’s how:

library(htmlreportR)
container <- list(data1 = data_frame_1, data2 = data_frame_2,
                  additional_field = "You can include anything in the container
                  and it will be available in plotter$hash_vars")
plotter <- htmlReport$new(title_doc = "Your report title", 
                          container = container, tmp_folder = "tmp_lib",
                          src = "path/to/htmlreportR/scripts")

Copy Link

Version

Install

install.packages('htmlreportR')

Monthly Downloads

198

Version

1.0.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Álvaro Esteban Martos

Last Published

August 19th, 2024

Functions in htmlreportR (1.0.0)

barplot-htmlReport-method

Build CanvasXpress barplot from R data frame
static_plot_main-htmlReport-method

Generate static plot for HTML report
get_plot

Get Plot from htmlReport Object
write_report-htmlReport-method

Write HTML Report
line-htmlReport-method

Build CanvasXpress line plot from R data frame
main_htmlreportR

Build report by loading files from disk and rendering template.
get_plot_data

Get js Plot from canvasxpress_obj Object
parse_data_frame-htmlReport-method

Print data frame in HTML format
make_head

Make HTML Report Head
static_ggplot_main-htmlReport-method

Generate static ggplot for HTML report
scatter2D-htmlReport-method

Build CanvasXpress scatter2D plot from R data frame
get_data

Retrieve Data from htmlReport Object
density-htmlReport-method

Build CanvasXpress density plot from R data frame
extract_data

Retrieve Data from htmlReport Object
compress_data

encode and compress data json
add_header_row_names

Add Header and Row Names to Data Frame for HTML Report table
concat

Custom addition operator for combining htmlReport objects
get_data_for_plot

Get Data for Plotting from htmlReport Object
build-htmlReport-method

Build HTML report from template
build_body

Build HTML Report Body